Unable to install PostgreSQL on dev machine - postgresql

I'm trying to install PGSQL 8.3 (and 8.4 and 9.0) on my work laptop. At the end of the installation, the installer complains it can't init the cluster. Investigating more, I noticed that the service is not even installed. I did use the "OneClick Installer", not the pgAdmin stand alone install. I tried installing as Administrator and as a regular user. In all the cases, the pgsql system account is created and the files copied, but the service is not.
I successfully installed PGSQL many times on my home PC. Both the laptop and desktop use Windows 7 64 bits (former is Professional, later is Ultimate). The only differences I can think of are that the laptop is part of an Active Directory and uses McAfee, while the desktop is only on a workgroup and uses Windows Security Essentials.

Are you sure the postgres user is allowed to create files in the data directory? The installer defaults to putting the data directory where the binaries are installed (e.g. c:\Program Files) which is usually not writeable by a regular user (and I never understood why the installer contains such an idiotic default).
McAffee could be an issue though. I have heard several stories about virus scanners infering with the Postgres (or other DBMS). Can you turn McAffee off - at least for the data directory?
Another problem could be that the installer is not able to create the postgres windows user (that is used to run the service).
If you are a local administrator on that machine, try to create the user before the installer does it. The installer will then not try to create the user account.
As a last ressort, you could install PostgreSQL without the installer (this is what I usually do).
Download the ZIP file from http://www.enterprisedb.com/products-services-training/pgbindownload
Unzip it into a convenient location
Run initdb (make sure you do that using the postgres user account - the one that is used to run the service later!)
run pg_ctlr register to create the Windows service
If any of those steps fails you'll see a proper error message which is not always the case with the installer.

Anti-virus is a well known issue:
http://wiki.postgresql.org/wiki/Running_&_Installing_PostgreSQL_On_Native_Windows#Antivirus_software
PostgreSQL connection problems
(answer is from one the core developers)
Postgresql 8.4 and BitDefender 11

With earlier versions of PostgreSQL, I found I had to delete the user "postgres" before reinstalling would work. Not sure what versions had that problem, though.

Related

Offline slony installation on enterprise database 13.1

I have been using Windows 10 operating system. I want to use slony master-slave setup with postgresql. For this, I have downloaded enterprise database 13.1 version. After installation I select slony download from stackbuilder plus. Then I copied these 2 files to offline windows 10 machine. I install both of them. After that, i try to run a simple slonik script to setup master. while executing "init cluster" command i get file not found error, c:servershare/slony1_base.2.8.sql. Do you have an idea for the solution?
After setting SLONY_SHARE_DIR to the location that the slony1 .sql files are in, everything works fine.

PostgreSQL 12.3 Windows x86-64 Installer doesn't start

I am trying to install PostgreSQL 12.3 version using installer from here, my system runs on Windows 10 (64bit). I did this procedure on different laptops (running on win10 64bit) and didn't encounter any problems until now. When I download installer and double-click on it, I am asked for administrator permissions (I grant permission to install software). After that, EDB Postgres logo appears on the screen for a few seconds and disappears and this is it. Nothing else is happening. In normal way after logo disappear, Postgres Installer should launch asking where to install, what port to use and other similar questions, but in my case it doesn't happen. I now that I can use Zip archive to install Postgresql manually, (I found how to do it in this answer), but this answer skips most important part - configuration.
Also I tried older versions of installers and every time I ended up with same result - loads only EDB Postgres logo...

troubles connecting to a (remote) PostgreSQL database using FireDAC & Delphi 10.3.3

Using Delphi 10.3.3 I need to access a Postgress database on a remote server. I am trying using FireDac. I am not able to connect to the remote database, so I thought to create a testprog and a local PostgreSQL-database first. So I installed PostgreSQL 32 bit on my machine. Copied the libpq.dll to the same location as my exe, copied the libpq.dll to Windows\System32 as well. Checked the PATH, System32 is there. But still I get "Cannot load vendor library (libpq.dll). The specified module could not be found"
I tried 64 bit versions as well, I found different versions of the libpq.dll which I tried without success.
Do you have any experience in how to solve this ?
If you have the latest libpq.dll, does the remote database version matter ? I am new to PostgreSQL, how can I find the version ?
Just libpq.dll is not enough, you need other DLLs. You will find the full list here.

Why is PostgreSQL remembering my previous instalations?

Recently I installed PostgreSQL 10.4, but it was losing connection all the time. I uninstalled it, removed the data folder and installed version 9.6, which didn't help, so I uninstalled it as well and removed the data folder. I installed 10.4 again hoping that it will work well this time.
When I opened pgAdmin it showed as if version 9.6 was still installed apart form the 10.4 (which should be there). I tried creating a user in it (to see if it really works) and it created it successfully, but after further investigation I realized that it created the same user in the 10.4 installation. It must have been the same installation, but pgAdmin saw it as two separate ones. I deleted both installations form pgAdmin and reinstalled version 10.4.
Everything works fine now, but I still wanted to ask what might have caused this issue? Can it cause problems for my existing db in the future?
It's not "PostgreSQL" that remembered the installation. It's pgAdmin where you simply didn't delete the configured connection. Connection information is something specific to the SQL client, not the database server.
The existing connection definition uses the same hostname, port and apparently password that was valid for a running 9.6 server or the new Postgres 10 server. The name of that "server" is something that is specified in pgAdmin and has nothing to do with the actual Postgres installation. You could have named the "9.6 Server" connection "Connect to some nice DBMS" instead.
That information is not stored together with the PostgreSQL installation, but in your user profile.

Deploy files on a network share from a client machine using an installation package?

We have a large application that has been developed over 15 years and in installed in 200+ client locations. The application currently consists of an Access database and a bunch of executable and report files located on a network share. A Setup.EXE file is run on each client machine (dlls are installed on the client) and then the client machines run the executables directly from the network share. During our upgrade procedure the new executable and report files are copied to the network share and that way each client gets the update immediately.
Our current installation program is very old and, among other things, it doesn't handle x64 so we are in the process of moving to a new deployment tool. At the same time we are migrating client Access databases to SQL Server. I am having difficulty finding a deployment tool to do what we require. Specifically we need the install/upgrade file to do the following:
It must be able to be run from a client machine on a network and copy the new executable and report files to the network share. That share could be a Linux box or a dumb storage device.
Accept a password before running the installation
Allow the user to select the network share as the location to copy the executables
It must NOT add anything to the client machine from where the package is run (Add/Remove Programs, registry, etc.)
Connect to a SQL Server database and run a script
The install/upgrade must be contained in a single, standalone .msi or .exe file. (no dependencies on dlls or frameworks other than those that come with Windows XP)
The file must be able to be run in one simple step. It is the end user that runs the upgrade without our support and without involvement from IT.
It looks like the closest thing to what I need is WiX but the problem there is that whenever the .msi file is run from a client, the client machine thinks that a program is being installed so it allows the client machine to uninstall the product, which is not acceptable.
If the product were written today it would certainly be architected differently but it currently is what it is and we can’t change that. Any help here would be greatly appreciated!
WiX is just a toolset built on top of Windows Installer technology. It makes many things easier and simpler as well as hides lots of Windows Installer weird features... But, it is still limited by Windows Installer, its underlying technology.
Your list of requirements made me think that Windows Installer is not the right technology to choose. I would assume that you'll spend more time on workarounds, than on functional code... But I have no experience with other installation technologies, so I'll leave those recommendations to others.