Slamdata error when mounting: An unknown error ocurred: 500 "" - mongodb

I have once before mounted this same database, so I am confident that I have the correct credentials.
During the last session that I had it mounted I was experimenting with my queries, visuals etc. and the session all of a sudden crashed.
Then when I reloaded slamdata, the mount for my database was gone.
Obviously I then tried to remount the same database with the same credentials in order to continue my work. However when I did this I got an error:
There was a problem saving the mount: An unknown error ocurred: 500 ""
And then there is a never ending spin wheel that sits on the mount button. I can leave this pop up and go to the original screen, but nothing occurs. And then if I try to remount again the same error occurs.
I have verified that I can still access my db and collections using robomongo. So if anyone knows what this error message refers to please let me know! I have yet to find its meaning online.
Note: I have already tried uninstalling and reinstalling/ restarted my computer.

In SlamData 4.2.1 this bug has been identified and fixed an issue with the MongoDB connecter that would corrupt the metastore if you use the _id field in a query. The fix is available in the SlamData 4.2.2 release soon
Below is the fix:
Delete the current metastore. Below is the location of this file for each supported operating system:
Mac OS:
$HOME/Library/Application Support/quasar/quasar-metastore.db.mv.db
Microsoft Windows:
%HOMEDIR%\AppData\Local\quasar\quasar-metastore.db.mv.db
Linux (various vendors):
$HOME/.config/quasar/quasar-metastore.db.mv.db
Open a terminal and switch to the location that you stored SlamData into. You should find a quasar-web.jar file in the following location based on your installed operating system based on default installation paths:
Mac OS:
/Applications/SlamData 4.2.1.app/Contents/java/app/quasar-web.jar
Microsoft Windows:
C:\Program Files (x86)\slamdata 4.2.1\quasar-web.jar
Linux (various vendors):
$HOME/SlamData 4.2.1/quasar-web.jar
Run the following command in a terminal:
java -jar quasar-web.jar initUpdateMetaStore
This will rebuild your metastore. Once complete it will return you to your operating system prompt.
Rerun the SlamData application as you normally would
Remount your database
At this point in time you can access your saved workspaces.
NOTE: You will not want to open the workspace you were using that caused this issue as it will cause the same problem.

Related

Bootstrap failed: 5: Input/output error while running any service on macOS Big Sur version 11.5.2

I am trying to run mongodb-community#4.2 service using brew services start mongodb-community#4.2 (facing similar error, while running httpd service or any other service)
Following is the error:
Error: Failure while executing; /bin/launchctl bootstrap gui/502 /Users/chiragsingla/Library/LaunchAgents/homebrew.mxcl.mongodb-community#4.2.plist exited with 5.
There can be multiple reasons behind this error message. So, the first thing to do is to find where your mongo related logs are stored. To do that, run the following command -
sudo find / -name mongod.conf
This will get you the mongo db config file. On running this command, I got /usr/local/etc/mongod.conf. You may find it directly under /etc.
On opening mongod.conf, you will find log path mentioned there. You can open the file itself, or instead get the last 15-20 lines of this log file via tail command -
tail -n 15 <<your mongo db log path>>
Now, you will need to debug the issue mentioned in the logs. Generally, I have seen these three sets of issues -
Permission issue with /tmp/mongodb-27017.sock - While some SO answers asked to change the permissions for this file as a solution, my issue with this only went away after I removed this file.
Compatibility issue - If you see a message like Version incompatibility detected, it means that the mongodb version you have currently installed is different from the version whose data is present on your system. Uninstall the current mongodb version and then install the correct older version (if you don't want to lose the data).
Once you have done it, and your mongo is up and running, and you want to upgrade mongodb version, follow this SO answer.
Permission issues with WiredTiger - Using chmod to change file permissions resolved these.
In case you have any issue other than these three, you will still need to search more on SO and figure it out. Hope this was of some help! :)

Postgres database cluster initialization failed on windows upon installation?

I'm trying to install postgreSQL on my windows 10 computer for the first time. I got an error at the end of the installation saying that there was a "problem running post-install step. Installation may not complete correctly. The database cluster initialization failed."
When I run the sql shell I get an error trying to do the default login that says 'chcp' is not recognized as an internal or external command. I set the environmental path variable to the bin of the Postgres folder in my program files. I also tried a number of other (but very dated) solutions to similar problems users experienced such as moving my data directory outside of the Postgres directory entirely. Most of these solutions date back to 2012 and don't seem to work anymore.
The one that seemed closest to working is postgresql installation failed.
However, I can't find "postgres" as a user. I get an error saying:
"An object named "postgres" cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection."
Does anybody have any updated solutions/tips for this?

Failed to load sql modules into the database cluster during PostgreSQL Installation

I have attempted to install PostgreSQL 9.4 and 8.4 multiple times and it is failing no matter what I have tried. I am attempting to install on Windows 7 SP1 x64. After each failed install I have uninstalled and deleted the installation folder to start fresh.
Each time I attempt the install I get an error pop up near the end of installation that says:
"failed to load sql modules into the database cluster".
Then another error pop up displays immediately after that says:
"Error running post install step. Installation may not complete correctly. Error reading C:/Program Files/PostgreSQL/9.4/postgresql.conf"
I have attempted installation with the following actions:
Always installed as administrator
Turned off all virus protection and windows firewall
Changed the installation directory to something other than the Program Files directory.
Changed the data directory to something other than the installation directory of postgres
None of the actions above have helped and I always receive the error. Any help that someone can provide would be greatly appreciated!
Encountered a very similar problem that OP is reporting today while installing Postgres 9.4.
It turns out that the password generator I was using has made a password that contains non-alphanumeric characters. ("^") I believe was the culprit in this case. Removing that allowed the installation of Postgres 9.4 (Windows 64 bit) to complete.
Very easy fix once you've found it, but the error message that comes up is not descriptive, so in this case I didn't notice at first what I was doing wrong.
I was getting this same error when trying to install PostgreSQL v9.4.4 on Windows 10 Pro. Starting with a solution hosted on Stack Exchange, I came up with the following steps that allowed the installer to run successfully:
1) Create a new user account, called postgres
2) Add the new account to the Administrators and Power Users groups
3) Restart the computer
NOTE: I added step #3, since step #4 didn't work without it
4) Run a command prompt as the postgres user, using the command:
runas /user:postgres cmd.exe
5) Run the installer from the postgres command window
6) Delete the postgres user account, as well as the user directory
NOTE: I added step #6, since the postgres account is not required after installation
What worked for me is, during the install, specifying a Postgre SQL data folder that's outside of any Windows user profile directory (C:\Users), such as C:\postgres-data.
My setup:
Win 10 Pro
PostgreSQL 9.5 RC1
I ran into this issue when I tried setting PostgreSQL's data directory somewhere under my user profile's directory, such us somewhere under "My Documents".
I tried Jeff G's solution and it didn't work at first. It worked only when I kept the data directory as the default (C:\Program Files\PostgreSQL\9.5\data). So then I tested further and tried setting the data directory to somewhere outside of any user profile directories (i.e. somewhere that isn't under C:\Users). For example, C:\postgres-data and this worked.
I then just tried using that directory with my default user, and not bothering with the postgres temp user as outlined in Jeff G's solution and that also worked. So in the end, it had to do with my data directory being somewhere under C:\Users. As long as it was outside of that, it worked.
None of these answers here helped me, finally I solved this problem by creating the folder before the installation (C:\PostgreSQL\data) and giving it full access for the group "Users".
Windows 7 x64, postgresql-9.5.2-1-windows-x64
Hope It's Work.
1.)Uninstall PostgreSQL
2.)Delete the postgres user if it still exists :
net user postgres /delete
3.) Create the postgres user with a password you can remember:
net user /add postgres
4.) Add the postgres user to the Administrators group:
net localgroup administrators postgres /add
5.) Add the postgres user to the Power Users group
net localgroup "power users" postgres /add
6.) Run a command window as the postgres user:
runas /user:postgres cmd.exe
7.) Change user postgres and install postgresql
8.)Back your and remove the postgres user from the Administrators group.
net localgroup administrators postgres /delete
I had the same error ("Failed to load SQL modules into the database cluster.") when installing on W2K12R2 using the EnterpriseDB installer linked to from the PostgreSQL Windows download page. I tried running the installer with admin privs, and using the postgres-user solution offered by Jeff G, but neither worked. Finally I tried the second installer, BigSQL, and that installed without issue.
When installing PostgreSQL, do not use the following symbols in your database's admin password: %, <, and >.
Bug report and problem solution here
Changed the data directory to something other than the installation directory of postgres
Make sure NETWORK SERVICE has read/write permissions on that folder, the installation was failing for me until I did this.
I had this issue too with 9.5 and got around it by:
Installing with the default data folder.
Making sure my new data folder had full control access for the "NETWORK SERVICE" account.
Then changing the default PGDATA folder as per this instruction: https://wiki.postgresql.org/wiki/Change_the_default_PGDATA_directory_on_Windows
I had the same problem, and noticed that some Postgres .bat files were opening in a text editor. Text editors opening files during installation isn't too uncommon, but I noticed these batch files were setting directory permissions. I then found that .bat files were set to open in a text editor (Notepad++) by default. I changed the default program for .bat files, uninstalled Postgres, re-ran the installer, and it worked perfectly. Hope this helps.
I had the same problem before. I solved this by installing Visual Studio C++ Express first.
I had the same experience as #gomisha. #Jeff G's solution did not work for me no matter which user ran the installer.
As long as the target data directory was anywhere under c:\users, the install or database cluster init would fail.
I was successful after creating c:\postgresql-data and ensuring that the postgres user had full access in the 'effective access' tool.
Note: I did not use control userpasswords2 to set up the postgres user; I did it through the traditional crappy Windows 10 user wizard that tries to make the user sign up for hotmail. I did run the install as postgres.
I was getting this issue with the BigSQL windows installer PostgreSQL-9.6.5-1-win64-bigsql.exe
The problem turned out to be that my system path was too long. After removing some uncessary junk from my System Path, and then reinstalling, the problem was gone.
One of the answers here is the only thing that worked on my machine:
I had the same error message when trying to install 9.2.4. My issue
was because even though the Win2k8 server had %SYSTEMROOT%\system32 as
part of the path, no programs could "see" anything in
C:\Windows\system32. The installer heavily uses icacls.exe during the
init routine. Since my path was screwed up, the installer bombed out.
Once I explicitly added C:\Windows\system32 to the SYSTEM's Path
environment variable and re-ran the installer as an admin, everything
worked fine.
Credits to the user.
Go to services.msc
Search for postgres service
Go to Log On tab
Select local account
Profit
The alternative solution for problems with PostgreSQL installer is setting this up with a Docker.
Install Docker Desktop
https://www.docker.com/products/docker-desktop/
Start installed Docker Desktop
In PowerShell, run:
docker pull postgres
In PowerShell, run:
docker run -d -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=mypassword postgres
Now you can connect to the Postgres server for example with pgAdmin on the same machine, using:
host: localhost
port: 5432
maintenance database: postgres
username: postgres
password: mypassword
I think this would be better as individual comments above, but I don't have the required rep. I just spent days on this, with Postgres 10 on Win 10 Creators. My "answer" was to let Postgres put the data in its default install folder instead of my User folder (where it would be automatically backed-up).
1. This problem can happen with no reported install errors at all. On my very first try, I saw:
Failed to load SQL modules into the database cluster.
But that seemed to be due to:
Executing C:\Users\loren\AppData\Local\Temp\postgresql_installer_aee8e5a76f\vcredist_x64.exe /passive /norestart
Script exit code: 3010
MSI (s) (AC:FC) [14:21:35:341]: Product: Microsoft Visual C++ 2013 x86 Minimum Runtime - 12.0.40660.
Restart required. The installation or update for the product required a restart for all changes to take effect.
The restart was deferred to a later time.
Restarting Windows after the failure of the rest of the Postgres installation did not let Postgres run.
Once VC was in place, uninstalling and re-installing Postgres (still with its data in my User folder) completed with no reported errors. But every attempt to access it, by any means, still resulted in something like this:
C:\Program Files\PostgreSQL\10\bin>psql
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
The RawCap sniffer showed TCP SYN followed immediately by RST,ACK on localhost for both v4 and v6 for each try. Netstat did not see port 5432 in use at all. All Postgres runtime logs were totally empty. In Windows Services, I could manually start the postgresql-x64-10 service, but it immediately stopped itself, with the note that some services do that normally.
2. I tried moving the data directory via the Postgres wiki procedure. Apparently for Postgres 10 it is incomplete. It does not deal with:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-10\Data Directory
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\postgresql-x64-10\Data Directory
C:\Program Files\PostgreSQL\10\pg_env.bat
C:\Program Files\PostgreSQL\10\scripts\serverctl.vbs
But fixing every data file instance I could find did not let it run. And even after fixing all those, and uninstalling and re-installing again with the default location, the new pgAdmin4 somehow still remembered my original User data directory location!
3. I did not try giving NETWORK SERVICE read/write permissions on my User folder. Once the default install worked I wanted to get on with my original project... Maybe that would have worked.

postgresql installation failed

I tried to install postgresql 8.4 in my windows 7 (64 bit). But it fails with following messages in log
Initialising the database cluster (this may take a few minutes)...
Executing cscript //NoLogo "C:\PostgreSQL\8.4/installer/server/initcluster.vbs" "postgres" "postgres" "****" "C:\PostgreSQL\8.4" "C:\PostgreSQL\data" 5432 "DEFAULT"
Script exit code: 1
Script output:
CScript Error: Can't find script engine "VBScript" for script "C:\PostgreSQL\8.4\installer\server\initcluster.vbs".
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\PostgreSQL\8.4/installer/server/initcluster.vbs" "postgres" "postgres" "****" "C:\PostgreSQL\8.4" "C:\PostgreSQL\data" 5432 "DEFAULT" : Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
I have googled about this and run the command 'regsvr32 vbscript.dll' and it shows the message 'DllRegisterServer in vbscript.dll is succeeded', but it haven't solved my issue.
Also I set the default value for {B54F3741-5B07-11cf-A4B0-00AA004A55E8} in registry to the file path of vbscript.dll, but it also haven't solved my issue.
How to fix this issue?
Following link solve my issue
http://www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/
The article text:
I’ll keep this one short and sweet. For those of you that have tried
to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the
error Database Cluster Initialisation Failed error at the end of the
install, read this.
The problem is that Vista has some safety features associated with
setting permissions on the Program Files folder. Basically, even if
you are an admin, you can’t change permissions on some folders like
Program Files and Windows folder itself. This causes initdb to be
unable to create some folders and the database cluster. What this
means for you is that you need to install PostgreSQL in another folder
that is not inside Program Files.
By the way, if you have forgotten your Postgres account password while
installing the first time, just open a Command Prompt in Vista (If you
don’t know how, Google for it). Then type the command “net user”. You
will see a list of users on your computer. Find Postgre’s account.
It’s usually “postgres“. Then you need to change its password by
typing “net user postgres new_password” where new_password is… well, a
new password for the account. You will be needing that postgres
account during install. You will need admin privileges to do this
change however.
Firstly, uninstall any failed installations. Use the Control Panel or
the PostgreSQL installer in the install folder.
During the install, you will be prompted to choose where you want to
install the program. Just select a location in another place. Like
“C:\PostgreSQL” or something similar. It may even be on your desktop.
But not inside Program Files. Not inside Windows folder. However, it’s
not as easy. Bear with me.
After the install, you will still see that darned error message (or
something like non-fatal error occured). Do not despair! (For Windows
Power Users, we are just assigning Full Control permission to Postgres
account on the new PostgreSQL install folder). For other users, read
on if you don’t know how to do it.
Go to where you just installed PostgreSQL. In this case, the C:
drive. There, right-click on the folder (usually called PostgreSQL),
and go to Properties – Security tab. Click on the Edit button. You
will now see some usernames and other stuff. Click on the Add button.
In the “Enter the object names to select” box, enter “postgres” and
press Check. Postgres’ user account should appear there. Click on Ok.
Now from the “Group or Usernames” box, select the Postgres account. In
the window below, with lots of checkboxes, assign permission “Full
Control” in the Allow Column to it. Note, if you don’t want to allow
full control, just give it read/write. But I just went ahead and gave
it Full Control. (I was tired and annoyed. The “World’s most advanced
open source database” had failed to install!). Click on Ok and wait a
bit for permissions to be applied.
Then, just do a re-install. Do not uninstall anything. Just run the
setup again. It’ll say that a PostgreSQL install folder already exists
and other stuff. Just click on Next until the install finishes. If you
see “file cannot be copied” errors, click on the “ignore” button when
needed.
That’s it. PostgreSQL should be up and running on Vista now. Hope it
works for you too as it did for me, and that my guide is helpful to
anybody. If it works, or if you have other solutions, let us know.
Thanks for reading! :)
I got the same result installing "postgresql-9.2.3-1-windows-x64.exe" on Windows 7 Enterprise
and the problem get solved when I change the installation path.
Try to install into "c:\postgresql" instead of "c:\program files\Postgresql"
Good luck
For me the problem was that PATH variable did not have C:\Windows\system32 and so it did not find ICACLS command to change folder permissions. So the solution is to add C:\Windows\system32 to system PATH variable (if it does not contain it already):
Control Panel -> System -> Advanced System Settings -> Advanced -> Environment Variables
Under "System variable" find and select "Path"
Click "Edit..."
Now if value does not contain path to system32 append string ;C:\Windows\system32 (or wherever your windows path is)
I've pulled shin's link from the google cache:
Original link:
http://www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/
Cached link:
http://webcache.googleusercontent.com/search?q=cache:RXu-5-ZzfcgJ:www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/+&cd=3&hl=ro&ct=clnk
PostgreSQL Database Cluster Initialisation Failed Solution
I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.
The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.
By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.
Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.
During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:\PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.
After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.
Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.
Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.
Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.
That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading!
Solution:
• Uninstall PostgreSQL
• Run command: net user postgres /delete
• Click: Control Panel -> User Accounts -> Configure advanced user profile properties -> delete all “Unknown User” instances that seem to be left from PostgreSQL installation.
• Run: compmgmt.msc -> Click Local Users and Groups -> Users -> New User… -> User name: postgres, Password: postgrespass -> Create
• Run: compmgmt.msc -> Click Local Users and Groups -> Users -> postgres ->Member of -> Add… -> Administrators -> OK
• copy the PostgreSQL installer postgresql-8.4.9-1-windows.exe to C:\
• Run: runas /user:postgres cmd.exe -> cd \ -> postgresql-8.4.9-1-windows.exe -> installed successfully without errors. Checked data folder and confirmed files created successfully.
• Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Administrators -> Remove
• Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add… -> Power Users -> OK
Your Windows install is a little borked, and you will need to re-register the VBScript engine to get the installer to run.
Edit: I'm blind, the post author had already tried this.
See:
http://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows#The_installer_exits_with_a_runtime_installation_error.3F
I had the same problem when trying to install PostgreSQL 9.3.5-3 on a Windows 7 x64 machine (not joined to a domain) in a folder, created on the root, with full access to everybody. The problem was solved by not using ä in my password, so avoid using non-English characters in your password.
This message still occurs in Postgres v9.3.1.1.
For me, the problem was running the installer under the "Administrator" account. This doesn't work. Run it under an administrator account, avoiding the built-in "Administrator" account.
I don't really know what it's usually called, but it's the one that already exists on a fresh install; the one that cannot be changed to a Standard User; the one whose profile is stored in C:\Users\Administrator. Turns out it was a bad idea using this account; learned it the hard way.
(Windows Server 2008 R2 64-bit)
Hey guys the answer is very simple just install postgresql on another folder outside program files. it prompts a non fatal error and proceeds to with the installation...
I have solved the same problem on Windows Server 2003 and postgres 9.2.9-3 by creating directory for installation beforehand, and giving full access on it to group "Users".
The answer is very simple, move the downloaded .exe file to some other folder . for ex: c:\postgres and try to install it.
your issue is due to some admin privilege issues
There seem to be many reasons cause the installation fail.
In my case, I'm using Windows 10 home edition, which has no advance user group control,
so a lot of solutions above doesn't work for me. And I guess this is why the installation fails.
What I do is just using BigSQL's installer instead of EnterpriceDB's installer,
Choose the second installer in posgresql download center
Or visit BigSQL directly.
After some struggle I came across this post. I struggled some more time and I think I finally figured it out with the help of all the invaluable input from my predecessors in this post.
My case
It's November 2018.
PostgreSQL 11.1 Winodws-x64 from EnterpriseDB as suggested by postgresql.org
Tried to install on Windows 10 (both Home and Professional)
I tried several constellations and boiled down the process to this:
Pre-installation
Uninstall any failed installations.
Add a local user "postgres" (lowercase worked for me) to your computer, assign a SIMPLE password and administrative rights. Do avoid special characters at all expenses, stick with english letters (upper and lowercase) and numbers only.
Add a folder on your computer OUTSIDE the "C:\Program Files" or Windows folder. I chose C:\PostgreSQL
Assign full control over the above folder to the postgres account.
Installation
Run the installer (postgresql-11.1-1-windows-x64.exe in my case)
use the above password and folder when prompted (not the default folder)
Post-installation
For security reasons you should now assign a proper password to the windows-user "postgres" and remove administrative rights from the account.
Test your installation by running pgAdmin and connecting to your server. However, the password for the postgres user you need to connect to the server will still be the simple one you used earlier. You may change it within pgAdmin by selecting the postgres database left, choose Tools -> Query Tool and type ALTER USER postgres WITH PASSWORD '4wligzo748o$%&'; or whatever. Execute with the flash symbol or F5.
But maybe this is wrong altogether and you should rather run a linux vm with postgreSQL server.
Struggling with this problem for days. Finally got help from the EDB team
My problem got solved by doing the following steps :
1) Open the command prompt and go to the following directory:
cd "C:\Program Files\PostgreSQL\10\bin"
2) Once you are inside this "C:\Program Files\PostgreSQL\10\bin" directory execute the following command:
.\initdb.exe -D "C:\Program Files\PostgreSQL\10\data"
3) At the end of this command you will be promoted to execute a pg_ctl command to start the Postgres cluster. Please execute the command and once you get a message as the server started you are all set to use the Postgres database.
Note: Instead of 10 user whatever version you have installed. If the pg_ctl command in the third step gives an error after running it in \bin directory, then try running it in \data directory. After the above process re-run the installer.
I know it is not the the solution but installing 32 bit of Postgres, worked for me
I had the same problem when trying to install PostgreSQL 9.6.2 on a Windows 7 32 bit machine,but i got solution,first just uninstall the installed postgres,then delete the postgres folder from 'c' drive,delete the entry from temp file which resides in "C:\Users\AppData\Local\Temp".Then again installed postgres 9.6.2 that installed successfully.
Had this same problem trying to install on my company computer (PC running Windows 7). If you are not admin on your computer, you need to install it within your personal "User" folder (not in the "Program Files" folder(s) at the root).
If you still can't access Postgres:
Once you'd installed it under your "User" folder, use the 'Run' program and type in "services.msc" and hit enter. In the window that pops up, go down to your postgres installation, right-click and go to "properties". In the "Log On" tab, select "Local System account" then go back to the "General" tab and click "Start". It should boot after that.
After this, I was able to run "pgAdmin" and access the database (after entering the password I used during installation).
I had the same problem today when installing postgres 9.6.19 on windows 10.
Solution: Neither the installation path nor the windows path variable may contain a blank! Near to the end of the installer log file (found in wondows %temp% dir with a name like bitrock_installer_16156.log) i found:
Script stderr: "\UnxUtils\usr\local\wbin\";"C:\Program" kann
syntaktisch an dieser Stelle nicht verarbeitet werden.
where the installation directory i set as well as my windows %PATH% variable contained
C:\Program Files\
Workaround:
open a command prompt as administrator and type:
set path=C:\WINDOWS\system32
PostgreSQL-9.6.10-1-win64-bigsql.exe
And then of course choose a path not containing a blank.
That did it for me.
I encountered an issue where a username with a space in it on windows fails the postgres installation.
To test:
Reinstalled windows 10 home (restored)
Made a user account without the space
Postgres installed successfully
Very frustrating...
check the services: if any folder there postgres related stop it, and change to disable mode.
check regedit: HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER -> software -> remove postgres folder if exists.
In system environment variable: TEMP path location, remove the TEMP folder for both user and system. and Rename the TEMP to TEMP1 or something..
In system environment variable: remove path for postgres if it exists.
Now change the location of postgres.exe file to another drive.
Restart the system
Then Run postgres.exe
create a new installation directory for postgres and put /data outside.
the easiest way i solve this was:
1.- uninstall if you have already installed
2.- delete all files with failed instalations
3.- start windows in secure mode
4.- run installer in secure mode (it pops a warning but ignore) and restart
and that's it when restarted the service was running ok and everything works fine

PostgreSQL issue: could not access file "$libdir/plpgsql": No such file or directory

I get this exception in PostgreSQL:
org.postgresql.util.PSQLException: ERROR: could not access file "$libdir/plpgsql": No such file or directory
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1721)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1489)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:236)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
I searched a lot and most solution points to a wrong installation. But this is my test db which has been running without issues for a long time. Also inserts are working. Issue occurs only on select queries.
Apparently, you moved your PostgreSQL lib directory out of place. To confirm this, try the following in psql:
> SET client_encoding TO iso88591;
ERROR: could not access file "$libdir/utf8_and_iso8859_1": No such file or directory
If you get an error message like this, then my theory is correct. You'll need to find out where those files ended up, or you can reinstall PostgreSQL to restore them.
To find out what $libdir is referring to, run the following command:
pg_config --pkglibdir
For me, this produces:
/usr/lib/postgresql
I have the same problem: the other postgres server instance (8.4) was interfering with the 9.1 one; when the 8.4 instance is removed it works.
the other instance can sometimes be removed from the system while still running (e.g. you do a gentoo update and a depclean without stopping and migrating your data). so the error seems particularly mysterious.
the solution is usually going to be doing a slot install/eselect of the old version (in gentoo terms, or simply downgrading on other distros), running its pg_dumpall, and then uninstalling/reinstalling the new version and importing the data.
this worked pretty painlessly for me