I haven't been able to re-install PostgreSQL + PostGIS properly on our virtual server.
Installing PostgreSQL the following error occurs about the end of the process:
"A non-fatal error occurred whilst loading database modules. Please check the installation log in C:...\Temp for details."
Here is what the log says:
Loading additional SQL modules...
Executing cscript //NoLogo "C:\Programme\PostgreSQL\9.0\installer\server\loadmodules.vbs" "postgres" "****" "C:\Programme\PostgreSQL\9.0" "C:\Programme\PostgreSQL\9.0\data" 5432
Script exit code: 2
Script output:
Installing the adminpack module in the postgres database...
Executing 'C:\DOKUME~1\Kiesow\LOKALE~1\Temp\rad3C00F.bat'...
Couldn't find the output file...
Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Programme\PostgreSQL\9.0\installer\server\loadmodules.vbs" "postgres" "****" "C:\Programme\PostgreSQL\9.0" "C:\Programme\PostgreSQL\9.0\data" 5432 : Program ended with an error exit code
Afterwards installation completes, I can start pgAdmin, log in and create new databases. Everything looks fine until I try to add PostGIS, using the stack builder wizard. Again the installation is almost finished, when:
"Database creation failed."
"Would you like to view the error log " "create_templatepostgis_db_error.txt'?"
This error log doesn't exist. I might ignore the error and create the template db manually, which works. But I cannot use types like 'geometry', so I think, PostGIS is not yet usable.
Maybe anyone of you has got an idea of what I could have done wrong? Any hints? Can anybody help me to interpret the error log?
I use Windows XP, PostgreSQL 9.0 32bit (same with 8.4), PostGIS 1.5.
Postgres 8.3 + PostGIS was installed on this system earlier, but I uninstalled, deleted the data directory and let the installation wizard create a new posgres windows user.
Did a few reboots, too.
And I did choose a locale instead of [Default locale] at Postgres installation.
This is another part of the log I am suspicios of. It is right in the beginning. Maybe this helps:
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Base Directory. Setting variable iBaseDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Version. Setting variable brandingVer to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Shortcuts. Setting variable iShortcut to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[15:44:31] Existing base directory:
[15:44:31] Existing data directory:
[15:44:31] Using branding: PostgreSQL 9.0
[15:44:31] Using Super User: postgres and Service Account: postgres
[15:44:31] Using Service Name: postgresql-9.0
Executing cscript //NoLogo "C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\prerun_checks.vbs"
Script exit code: 0
Script output:
The scripting host appears to be functional.
Script stderr:
Executing cscript //NoLogo "C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\postgresql_installer\installruntimes.vbs" "C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\postgresql_installer\vcredist_x86.exe"
Script exit code: 3010
Script output:
Executing the runtime installer: C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\postgresql_installer\vcredist_x86.exe
The runtime package exited with error code: 3010
From a command prompt, run this single command:
C:\Programme\PostgreSQL\9.0\bin\psql.exe -p 5432 -U postgres -W -f C:\Programme\PostgreSQL\9.0\share\contrib\adminpack.sql postgres
Its output may be more informative. Running the above is all the .vbs is doing, incidentally.
The reason for prompting this error message was due to because of localhost is pointing to some other machine.
disable firewall and antivirus and try installing it again.
Related
So, I came across the same issue as posted here, BUT my error log says something different (see below, please). I have been trying to install PostgreSQL 9.5.11 on Windows 10 (x64) using Enterprise DB interactive installer. But, no success (I am aware about the BigSQL installers but I prefer the Enterprise DB one :)).
I googled already and tried the suggested solutions here, here and here. However, no use. Can someone please help me to resolve this error?
Here is the lovely error message I am getting:
Log started 04/17/2018 at 11:28:34
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Executing C:\my_user\AppData\Local\Temp/postgresql_installer_676baef523/temp_check_comspec.bat
Script exit code: 0
Script output:
"test ok"
Script stderr:
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Base Directory. Setting variable iBaseDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Version. Setting variable brandingVer to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 Shortcuts. Setting variable iShortcut to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.5 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[11:28:39] Existing base directory:
[11:28:39] Existing data directory:
[11:28:39] Using branding: PostgreSQL 9.5
[11:28:39] Using Super User: postgres and Service Account: NT AUTHORITY\NetworkService
[11:28:39] Using Service Name: postgresql-x64-9.5
Executing cscript //NoLogo "C:\my_user\AppData\Local\Temp\postgresql_installer_676baef523\prerun_checks.vbs"
Script exit code: 1
Script output:
CScript Error: Loading script "C:\my_user\AppData\Local\Temp\postgresql_installer_676baef523\prerun_checks.vbs" failed (Access is denied. ).
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\my_user\AppData\Local\Temp\postgresql_installer_676baef523\prerun_checks.vbs": Program ended with an error exit code
I'm trying to install postgreSQL on my windows 10 computer for the first time. I got two errors at the end of the installation
1) a non-fatal error occured during cluster initialisation. please check the installation log in C:\users\abc\AppData\Local\Temp for details
2) problem running post-install step. Installation may not complete correctly.Failed to start the database-server.
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 and don't seem to work anymore.
The one that seemed closest to working is [PostgreSQL Database Cluster Initialisation Failed Solution][1]
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?
Please see the logs: I have added some more logs below this.
> Log started 09/08/2017 at 15:35:34
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Executing C:\Users\skum\AppData\Local\Temp/postgresql_installer_c42ee2159f/temp_check_comspec.bat
Script exit code: 0
Script output:
"test ok"
Script stderr:
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[15:35:38] Existing base directory: C:\Users\skum\postgres_inst
[15:35:38] Existing data directory:
[15:35:38] Using branding: PostgreSQL 9.6
[15:35:38] Using Super User: postgres and Service Account: NT AUTHORITY\NetworkService
[15:35:38] Using Service Name: postgresql-x64-9.6
Executing cscript //NoLogo "C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\prerun_checks.vbs"
Script exit code: 0
Script output:
The scripting host appears to be functional.
Script stderr:
Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\vcredist_x64.exe /passive /norestart
Script exit code: 0
Script output:
Script stderr:
Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\vcredist_x86.exe /passive /norestart
Script exit code: 0
Script output:
Script stderr:
Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\getlocales.exe
Script exit code: 0
Logs Part 1:
Failed to ensure the data directory is accessible (C:\Users\skum\postgresqlData)
Executing batch file 'radB66AD.bat'...
The files belonging to this database system will be owned by user "skum".
This user must also own the server process.
The database cluster will be initialized with locale "English_United States.1252".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory C:/Users/skum/postgresqlData ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
"C:\Users\skum\postgres_inst\bin\pg_ctl" -D "C:\Users\skum\postgresqlData" -l logfile start
Reading: C:\Users\skum\postgresqlData\postgresql.conf exists...
Writing: C:\Users\skum\postgresqlData\postgresql.conf exists...
Called AclCheck(C:\Users\skum\postgresqlData)
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:10.
MajorVersion:10
Executing icacls to ensure the NT AUTHORITY\NetworkService account can read the path C:\Users\skum\postgresqlData
Executing batch file 'radB66AD.bat'...
'icacls' is not recognized as an internal or external command,
operable program or batch file.
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:10.
MajorVersion:10
Granting service account access to the data directory (using icacls) to NT AUTHORITY\NetworkService:
Executing batch file 'radB66AD.bat'...
'icacls' is not recognized as an internal or external command,
operable program or batch file.
Failed to grant service account access to the data directory (C:\Users\skum\postgresqlData)
initcluster.vbs ran to completion
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Users\skum\postgres_inst/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" 5432 "DEFAULT" 0: Program ended with an error exit code
Configuring database server startup...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startupcfg.vbs" 9.6 "NT AUTHORITY\NetworkService" "****" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" "postgresql-x64-9.6"
Script exit code: 0
Script output:
startupcfg.vbs ran to completion
Script stderr:
Creating menu shortcuts...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\createshortcuts.vbs" 9.6 "postgres" 5432 "PostgreSQL 9.6" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" "postgresql-x64-9.6"
Script exit code: 0
Script output:
Start FixupFile(C:\Users\skum\postgres_inst\scripts\serverctl.vbs)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
Start FixupFile(C:\Users\skum\postgres_inst\scripts\runpsql.bat)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
createshortcuts.vbs ran to completion
Script stderr:
Starting the database server...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startserver.vbs" postgresql-x64-9.6
Script exit code: 1
Script output:
Starting postgresql-x64-9.6
Failed to start the database server (2)
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startserver.vbs" postgresql-x64-9.6: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
Failed to start the database server.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 09/08/2017 at 15:41:35
I am using psql with Redshift. Unfortunately, Redshift is uses PostgreSQL 8.0.2.
So when I downloaded the latest version of PostgreSQL (9.6.1) and try logging into a database, I get the error:
cannot connect from psql due to invalid parameter "client_encoding"
Instructions here https://forums.aws.amazon.com/thread.jspa?messageID=529120 suggest
set PGCLIENTENCODING=UTF8
But when I open SQL Shell (psql) in Windows, I am never given the chance to enter this command:
How can I bridge this gap/fix this error? Thanks
set x=y is the Windows CMD syntax to set an environment variable, just as x=y;export x or export x=y or setenv x y is on most Unix shells.
You can pre-set a (semi)permanent env var in Windows from ControlPanel / System (or ThisPC rightclick Properties), AdvancedSystemSettings, Advanced tab, EnvironmentVariables button. Or from CMD with the SETX command; SETX /? for help or http://ss64.com/nt/setx.html . (Or directly in the registry, but if you have enough skill to use regedit safely you wouldn't ask this Q.)
I have installed Postgresql on my Windows 10 PC. I have used the pgAdmin II tool to create a database called company, and now I want to start the database server running. I cannot figure out how to do this.
I have run the start command on the postgres command line, and nothing seems to happen.
What I doing is:
postgres=# pg_ctl start
postgres=# pg_ctl status
postgres=# pg_ctl restart
postgres=# pg_ctl start company
postgres=# pg_ctl status
.....-> I am seeing nothing returned.
Go inside bin folder in C drive where Postgres is installed.
run following command in git bash or Command prompt:
pg_ctl.exe restart -D "<path upto data>"
Ex:
pg_ctl.exe restart -D "C:\Program Files\PostgreSQL\9.6\data"
Another way:
type "services.msc" in run popup(windows + R).
This will show all services running
Select Postgres service from list and click on start/stop/restart.
Thanks
pg_ctl is a command line (Windows) program not a SQL statement. You need to do that from a cmd.exe. Or use net start postgresql-9.5
If you have installed Postgres through the installer, you should start the Windows service instead of running pg_ctl manually, e.g. using:
net start postgresql-9.5
Note that the name of the service might be different in your installation. Another option is to start the service through the Windows control panel
I have used the pgAdmin II tool to create a database called company
Which means that Postgres is already running, so I don't understand why you think you need to do that again. Especially because the installer typically sets the service to start automatically when Windows is started.
The reason you are not seeing any result is that psql requires every SQL command to be terminated with ; in your case it's simply waiting for you to finish the statement.
See here for more details: In psql, why do some commands have no effect?
If you have installed postgres via the Windows installer you can start it in Services like so:
After a lot of search and tests i found the solution :
if you are in windows :
1 - first you must found the PG databases directory
execute the command as sql command in pgAdmin query tools
$ show data_directory;
result :
------------------------
- D:/PG_DATA/data -
------------------------
2 - go to the bin directory of postgres in my case it's located "c:/programms/postgresSql/bin"
and open a command prompt (CMD) and execute this command :
pg_ctl -D "D:\PSG_SQL\data" restart
This should do it.
The simplest way to start/stop/restart the installed PostgreSQL Server on your Windows device is as follows:
Start -> net start postgresql-x64-14
Stop -> net stop postgresql-x64-14
Restart -> net stop postgresql-x64-14 && net start postgresql-x64-14
The version number must be changed to take into account the installed version of your PostgreSQL Server.
For windows the following command worked well for me
pg_ctl.exe restart -D "<path_to_data>"
Eg: pg_ctl.exe restart -D "D:\Program Files\PostgreSQL\13\data"
If you are getting an error "psql.exe' is not recognized as an internal or external command,... "
There can be :
Causes
System is unable to find the psql.exe tool, because the path to this tool is not specified in the system environment variable PATH
or
- PostgreSQL Database client not installed on your PC
Since you have already installed PostgreSQL the latter can not be the issue(assuming everything is installed as expected)
In order to fix the first one "please specify the full path to the bin directory in the PostgreSQL installation folder, where this tool resides."
For example
Path: "C:\Program Files\PostgreSQL\10\bin"
I found using
net start postgres_service_name
the only reliable way to operate Postgres on Windows
first find your binaries file where it is saved.
get the path in terminal mine is
C:\Users\LENOVO\Documents\postgresql-9.5.21-1-windows-x64-binaries
(1)\pgsql\bin
then find your local user data path, it is in mostly
C:\usr\local\pgsql\data
now all we have to hit following command in the binary terminal path:
C:\Users\LENOVO\Documents\postgresql-9.5.21-1-windows-x64-binaries (1)\pgsql\bin>pg_ctl -D "C:\usr\local\pgsql\data" start
all done!
autovaccum launcher started! cheers!
Remove Postmaster file in "C:\Program Files\PostgreSQL\9.6\data"
and restart the PostgreSQL services
There are different way to open PostgreSql database .
1> One of them is by going windows and select pgAdmin4 or pgAdmin3 depends to version you use and entering password you can access you database .
2> Another one is by terminal :
To able to select from terminal you have to add the path of your installed postgresql by going enviroment variables . To do that got to installed postgresql file and select the path of bin and add to enviroment variable of window setting .
after that you can type in terminal : psql -U postgres -h localhost
Hit enter and it ask you password . After giving password you can create database and tables and can access it .
I was try to solve the problem with Windows Terminal and I've cannot to solve it. Use Windows R + cmd (if you are using Windows) for it work!
The easiest way to enable pg_ctl command is to go to your PostgreSQL directory ~\PostgreSQL\version\bin\ and execute the pg_ctl.exe. Afterwards the pg_ctl commands will be available.
I have been trying to install PostgreSQL 9.2 for the last couple of days. I guess I tried everything that I could find online but the service still will not start. I am currently running Windows 7 SP1. I used to have PostgreSQL 8.3 installed and working fine but a couple of weeks ago I decided to uninstall it. I thoroughly uninstalled it (delete the postgres user and the data file) and now every time I try to install any version I get this non-fatal error at the end of the setup when the loading of the database modules takes place.
I managed to see that the postgresql service does not start or as windows puts it starts then stops.
This is the relevant part of the log file of the installation:
Successfully processed 771 files; Failed processing 0 files
initcluster.vbs ran to completion
Script stderr:
Configuring database server startup...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\startupcfg.vbs" 9.2 "NT AUTHORITY\NetworkService" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" "postgresql-9.2"
Script exit code: 0
Script output:
startupcfg.vbs ran to completion
Script stderr:
Creating menu shortcuts...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\createshortcuts.vbs" 9.2 "postgres" 5432 "PostgreSQL 9.2 (x86)" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" "postgresql-9.2"
Script exit code: 0
Script output:
Start FixupFile(C:\Program Files (x86)\PostgreSQL\9.2\scripts\serverctl.vbs)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
Start FixupFile(C:\Program Files (x86)\PostgreSQL\9.2\scripts\runpsql.bat)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
createshortcuts.vbs ran to completion
Script stderr:
Starting the database server...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\startserver.vbs" postgresql-9.2
Script exit code: 0
Script output:
Starting postgresql-9.2
Service postgresql-9.2 started successfully
startserver.vbs ran to completion
Script stderr:
Loading additional SQL modules...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432
Script exit code: 2
Script output:
Installing the adminpack module in the postgres database...
Executing 'C:\Users\George\AppData\Local\Temp\radA5996.bat'...
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432 : Program ended with an error exit code
[10:34:28] Write the data directory to the ini file...
[10:34:28] Write the port number, service ID, locale and superuser to the ini file...
[10:34:28] Write ServiceID(postgresql-9.2) to registry/ini...
[10:34:28] Write Superuser to ini file and windows registry...
[10:34:28] Write Service Account to ini file and windows registry...
[10:34:28] Write the server description to the ini file...
[10:34:28] Write the server branding to the ini file...
[10:34:28] Write the 'whether stack-builder is disabled or not' to the ini file...
[10:34:29] Finished running post-installation/upgrade tasks.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
I had the same problem. At one point it needs to get a package via internet connection. This is not right because the install package s/b able to install without a connection but that's how it is. Your firewall is blocking the install. Here's what you need to do:
Shut Down Windows Firewall (Control Panel\All Control Panel Items\Windows Firewall\Customize Settings)
If you use this great program shut down Firewall Control (Exit from task bar or Use Task Mgr to kill UI & Service - 2 items)
For downloading Selected Packages:
Shut Down Key Protection Services:
Shut Down Base Filtering (Leaves you unprotected! - Dependencies will.restart when BFE is restarted)
Base Filtering Engine
IKE and AuthIP IPsec Keying Modules
IPsec Policy Agent
ICS
...
Don't forget to restart all protections.
I faced similar issues of Pg 9.2.4 installer on Win7 x64. It turned out that
'adminpack' module did not load due to stopped postgres service. It starts and then
terminates almost immediately. You may check this running Pg service manually to see if it
can load. If it cant this may be from missing config files from "data" directory. initdb
command cant create valid cluster and copy corresponding *.conf files. I tried to dig into
details and the installer has complicated checks of user permissions which could fail in your (and my) case.
Just try installing Pg from zip binaries. It took only the following commands (less than
20 minutes). Original article.
1) Create "postgres" windows user (with no admin rights) and granted it full privileges on
your Pg folder and "data" folder. To do this from command line run "cmd" as administrator (press Ctrl-Shift-Enter instead of Enter to run "cmd") and issue: "net user postgres
/add". Then right click on your Pg folder (and "data" folder if it is outside) and grant all permissions to "postgres".
2) Install Microsoft Visual C++ 20xx Redistributable Package which comes with one click Pg
installer (vcredist_x64.exe from Users\"your user"\AppData\Local\Temp\postgresql_installer_**** - folder created by one click Pg installer on first run).
3) Unzip Pg binaries to your Pg folder and "cmd" as administrator to its bin directory.
4) Run to init cluster: initdb -U postgres -A password -E utf8 -W -D "path to your Pg folder"\data
5) Run to install windows service: pg_ctl register -N "postgresql" -U ".\postgres" -D "path to your Pg folder/data" -w
6) Open windows services list and open "postgresql" service properties. Then set password for windows user postgres there. Try starting your new Pg service. If it starts then everything should be ok.
7) Open bin\pgAdmin3, connect to local server and open postgres database and its metadata. You should see a complaint about missing admin services and a propose to correct this. Just press Ok - 'adminpack' should be installed.
Install postgres only from windows account written in english. For example installation from user "Аня" always fail.
Solution is to shutdown the windows firewall before installing. After the installation you can enable the windows firewall.
Try installing outside of "C:\Program Files" which has special permissions on Windows.
We had similar issues and simply by installing into C:\Postres92 everything works right out of the box.
I had the same problem, caused by restricted access rights in the Program Files directory, due to the fact that the data directory was C:\Program Files (x86)\PostgreSQL\9.2\data
Changing the data directory to C:\ProgramData\PostgreSQL\9.2\data resolved the problem.