Page 1 of 1

Unable to login to database (postgres)

PostPosted: Tue Mar 16, 2021 7:36 am
by JJer11
Good morning,

I would like some help concerning an issue I just discovered. I tried to find the solution on the forum but can't find a case like mine.
I explain: PT4 worked perfectly until my old Mac died, so I bought a new one and proceeded to the migration of all the system and apps (thanks to Time Machine save I made just before it died), but when I wanted to launch PT4 on the new Mac, the following message appeared:
Unable to login to database (postgres). Reason: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
It asks me to check configuration and says that it is unable to connect to this database.

Details :
iOS Big Sur
PT4 version 4.15.29
PostgreSQL 9.6


Could you please help?
Many thanks in advance

Re: Unable to login to database (postgres)

PostPosted: Tue Mar 16, 2021 1:29 pm
by Flag_Hippo
Time Machine isn't going to be able to migrate a program like PostgreSQL successfully. You can do a clean install of PostgreSQL and then restore from a database backup and/or reimport your hands.

If you want to try and recover from the data that was migrated then please open a Support Ticket with a link to this thread and the following information:

Open a Mac terminal program from "Applications" or "Utilities".

Resize the terminal vertically to make it taller then copy/paste this command:

ps aux | grep -i post

Take a screenshot of the terminal with the result of the command.

Run these commands as well and take a screenshot of the output of each:

sudo ls -la /Library/PostgreSQL

sudo ls -la /Library/PostgreSQL/*/data

grep postgres /etc/group

grep postgres /etc/password

For the sudo commands you may be asked for your Mac administrator password and for security reasons may not see anything as you type it in.

When a technician checks the output of those commands they can advise if it will be possible to recover your data.

Re: Unable to login to database (postgres)

PostPosted: Thu Mar 18, 2021 11:32 am
by JJer11
Thanks for your reply.

I tried to uninstall PostgreSQL 9.6 in order to make a clean install of the latest version I found: PostgreSQL 13.
The installation was successfull but when I relaunch PT4, another message said:
Unable to login to database (postgres). Reason: SCRAM authentication requires libpq version 10 or above

Do I have to open a support ticket?

Many thanks in advance for your reply

Re: Unable to login to database (postgres)

PostPosted: Fri Mar 19, 2021 7:51 am
by Flag_Hippo
PokerTracker 4 will not be able to connect to PostgreSQL v13 and it doesn't officially support anything higher than PostgreSQL v9.6. You can download and install PostgreSQL v9.6 from here.

Re: Unable to login to database (postgres)

PostPosted: Fri Mar 19, 2021 12:59 pm
by JJer11
Many thanks for your answer.
I totally uninstalled PT4 and PostgreSQL 13 and reinstall PT4 from your website. It automatically proposed me to install PostgreSQL 9.6.
Everything seems to work well again!
Thank you for your help :)