pgevent.dll can't be deleted because file opened by DHCP Client - postgresql

I am facing an issue with deleting the PostgreSQL install files after uninstalling PostgreSQL 10 from Windows systems. We have automated scripts (as a part of our product) which uninstall postgres and then delete PostgreSQL installation folders from the system.
In order to uninstall Postgres from the system, we call the uninstall-postgresql.exe file (which is created as a part Postgres install) in the following way:
uninstall-postgresql.exe --mode unattended
The un-installation completes successfully, however when I try to delete the whole Postgresql install folder, I get an error stating:
due to this, the uninstall scripts fail because one of the Postgres files can't be deleted. Currently, we reboot the system and then delete all postgres install files.
Can someone help me delete all postgres install files from the system including this pgevent.dll.
Thanks

Related

Why can't delete MYSQL folder in program file (Local Disc C)

I want to uninstall MYSQL workbench in my PC.after uninstall & while deleting MYSQL, it shows the action cant be completed because of the folder or a file in it is open in another program,Close the folder or file and try again .
I always try to delete folder but I couldnt.
You can't delete the folder because mysql service is using it.
Mysql workbench, by default installs mysql as a service, which is the recommended way to run mysql.
On Windows, the recommended way to run MySQL is to install it as a Windows service, so that MySQL starts and stops automatically when Windows starts and stops. A MySQL server installed as a service can also be controlled from the command line using NET commands, or with the graphical Services utility. Generally, to install MySQL as a Windows service you should be logged in using an account that has administrator rights.
From dev.mysql
On Windows, if you have used an installer to install something, you should uninstall it from Add Remove Programs.
Not only will its installer stop the service, and remove all files but also tidy up registry entries.

Postgres extension missing after upgrade

I have just upgraded my development postgres cluster from postgreSQL 9.6 to 11. Everything went fine except that I got an error around the pgtap extension that I use for unit testing.
Now when I try to restore a database I'm getting an error
"ERROR: could not open extension control file "/usr/share/postgresql/11/extension/pgtap.control"
When I look in the file system I can see all the pgtap files are still in /usr/share/postgresql/9.6/extension.
I tried uninstalling pgtap running sudo apt-get purge --auto-remove pgtap and then re-installing but this hasn't worked, all the files are still in the 9.6 directory.
pgTAP is a third-party extension, you won't find anything about it in the PostgreSQL manual.
You will have to install it separately in your v11 PostgreSQL installation. See the installation instructions for pgTAP.

Where does Homebrew put the delete_old_cluster.sh script after upgrading Postgres?

After upgrading Postgres via Homebrew and running brew postgresql-upgrade-database to migrate the database, the output shows Running this script will delete the old cluster's data files: ./delete_old_cluster.sh
Where can the script delete_old_cluster.sh be found? It's not in the current working directory.
found mine in /usr/local/var/log along with the other installation logs
used this command to find it:
find / -name delete_old_cluster.sh

PostgreSQL reinstall : Failed to load sql modules into the database cluster

I tried to re-install postgresql 9.5.3-1 on my windows 7 without success. In fact, at each attempt, I have the message:
failed to load sql modules into the database cluster
then, I get the message:
Error running post install step. Installation may not complete correctly. Error reading C:/Program Files/PostgreSQL/9.5/data/postgresql.conf
I tried several attempts to solve this issue
change the installation folder
switch to 32-bit
reboot
clean the register before reinstalling
install as a postgres user as describe here (Failed to load sql modules into the database cluster during PostgreSQL Installation)
PS: installation language is French
I finally found a solution to my problem. I just installed postgres as a super administrator
Had same problem. Just double check permission for your data folder. I set full control to authenticated users and it installs correctly.
Same problem here.
In my case it was a backslash \ at the end of the password.
See also https://stackoverflow.com/a/32146553/2443630

Connecting existing data folder in fresh installation

I had to reinstall Postgres x64 9.0.18 on Windows 7 from scratch and I have a full copy of the old data folder. How can I weave the existing database folder into the fresh installation of Pg 9.0.18? When I install over the same directory structure, the install routine recognizes the old data folder but claims that it doesn't contain proper database data. I also tried to start the postgres service with a different data directory (pointing -D to the copy of /data), but it won't start. Can I somehow edit or patch something in order to access my old database? In former versions there was a pg_databases file.