Issues Creating and Connecting PostgreSQL Database in PokerT
Hello PokerTracker Support Team,
I am writing because I have repeatedly tried to install and configure my PostgreSQL database for use with PokerTracker 4, but I keep encountering several errors and cannot proceed. Below I will detail my environment, the steps I have taken, and the exact error messages I have received:
1. My PC Environment
Operating System: Windows 11 (64-bit)
PokerTracker 4: Latest version (bundled with PostgreSQL 17)
PostgreSQL Installed Manually: Version 17.5 (port 5432)
I previously had an older PT4 installation with PostgreSQL 8.4, but I have fully uninstalled all 8.4 instances (services, Program Files\PostgreSQL\8.4 folders, pgAdmin entries, etc.). Now, in services.msc only the “postgresql-x64-17” instance remains active.
2. Steps Performed and Errors Encountered
Checking Services
I opened services.msc and verified that the postgresql-x64-17 service is “Running” and set to “Automatic”.
I restarted the service to ensure it was up.
In CMD, I ran netstat -aon | findstr :5432 and confirmed that port 5432 is listening under “postgres.exe”.
Creating an Empty Database in pgAdmin 4
I opened pgAdmin 4 as administrator, connected to the server “PostgreSQL 17 (localhost:5432) → postgres,” and went to Databases → Create → Database….
I entered the database name pt4_main.
I verified in the tree that pt4_main now appeared, alongside default postgres, template0, and template1.
“Select Default Database” Window When Launching PT4
I ran PokerTracker 4 as administrator.
Immediately, the “Select Default Database” dialog appears, showing something like:
pgsql
Copiar
Editar
Flags Database Name Server Port User Database
──────────────────────────────────────────────────────────────────────
PT4_2025_05_31_141716 localhost 5432 postgres PT4 DB
PT4_2023_01_03_220108 localhost 5432 postgres PT4_2023_01_03_220108
Attempting to select either one yields:
pgsql
Copiar
Editar
“Database ‘PT4_2025_05_31_141716’ is not a valid PokerTracker database.”
or
pgsql
“Database ‘PT4 DB’ is not a valid PokerTracker database.”
which indicates those databases do not contain the internal PT4 schema (for instance, tables like cash_hand_summary, ring_player_stats, etc.) or are corrupted.
Attempting to Create a New Database from PT4
From the same “Select Default Database” dialog, I clicked New and typed PT4_MAIN, host=localhost, port=5432, user=postgres (no password).
I receive this error:
pgsql
“Unable to create PostgreSQL database: PT4_MAIN
Reason: Error: Unable to execute query: Fatal Error;
Reason: ERROR: trailing junk after numeric literal at or near “1GROUP”
LINE 17: …mit, cash_hand_summary.cnt_players,FRO WHERE 1=11=1GROUP BY … ^”
This suggests PT4 is running an SQL script with malformed syntax (likely a leftover template containing 1=11=1GROUP stuck together).
Trying to Reconnect After Dropping Old Databases
I closed PT4.
In pgAdmin 4, I dropped every database whose name began with pt4_… (including pt4_main, pt4_mibase_2025, PT4 DB, pt4_template, etc.), leaving only postgres, template0, and template1.
I restarted the PostgreSQL service.
Reopened PT4 but still receive the same “trailing junk” error when creating the new database.
Firewall and Port Checks
I confirmed no firewall is blocking port 5432.
I added inbound/outbound rules in Windows Defender Firewall to allow TCP 5432 and allowed postgres.exe.
Despite this, PT4 still cannot create the database and throws the “This server is not responding to connection attempts” or the malformed SQL error.
In summary, PokerTracker 4 cannot create or connect to any valid database even though PostgreSQL 17 is running and I have removed all old remnants. The internal script that PT4 tries to execute to initialize the schema appears to be broken, leaving the installation unusable.
3. Request for Assistance
Could you please advise:
How to regenerate or fix the internal SQL script PT4 uses to create its tables, so that it does not contain the malformed condition 1=11=1GROUP?
If there is a corrupted “template” file that I need to remove manually (beyond just dropping databases in pgAdmin), or where I can obtain a fresh, clean version of that template for PG 17.
Any diagnostic tools or logs (advanced PT4 or PostgreSQL logs) I can check to pinpoint why the server is rejecting the creation commands.
An official step-by-step procedure (including any SQL scripts) that you recommend to force-create a brand-new PT4 database on PostgreSQL 17, bypassing conflicts with prior installations.
I have attached screenshots of each error dialog from PT4:
The “not a valid PokerTracker database” error when selecting preexisting databases.
The “trailing junk after numeric literal at or near ‘1GROUP’” error when attempting to create a new database.
The “This server is not responding to connection attempts” error after multiple reconfigurations.
I would appreciate any guidance or official solution you can provide. Thank you very much in advance for your help.
Kind regards,
I am writing because I have repeatedly tried to install and configure my PostgreSQL database for use with PokerTracker 4, but I keep encountering several errors and cannot proceed. Below I will detail my environment, the steps I have taken, and the exact error messages I have received:
1. My PC Environment
Operating System: Windows 11 (64-bit)
PokerTracker 4: Latest version (bundled with PostgreSQL 17)
PostgreSQL Installed Manually: Version 17.5 (port 5432)
I previously had an older PT4 installation with PostgreSQL 8.4, but I have fully uninstalled all 8.4 instances (services, Program Files\PostgreSQL\8.4 folders, pgAdmin entries, etc.). Now, in services.msc only the “postgresql-x64-17” instance remains active.
2. Steps Performed and Errors Encountered
Checking Services
I opened services.msc and verified that the postgresql-x64-17 service is “Running” and set to “Automatic”.
I restarted the service to ensure it was up.
In CMD, I ran netstat -aon | findstr :5432 and confirmed that port 5432 is listening under “postgres.exe”.
Creating an Empty Database in pgAdmin 4
I opened pgAdmin 4 as administrator, connected to the server “PostgreSQL 17 (localhost:5432) → postgres,” and went to Databases → Create → Database….
I entered the database name pt4_main.
I verified in the tree that pt4_main now appeared, alongside default postgres, template0, and template1.
“Select Default Database” Window When Launching PT4
I ran PokerTracker 4 as administrator.
Immediately, the “Select Default Database” dialog appears, showing something like:
pgsql
Copiar
Editar
Flags Database Name Server Port User Database
──────────────────────────────────────────────────────────────────────
PT4_2025_05_31_141716 localhost 5432 postgres PT4 DB
PT4_2023_01_03_220108 localhost 5432 postgres PT4_2023_01_03_220108
Attempting to select either one yields:
pgsql
Copiar
Editar
“Database ‘PT4_2025_05_31_141716’ is not a valid PokerTracker database.”
or
pgsql
“Database ‘PT4 DB’ is not a valid PokerTracker database.”
which indicates those databases do not contain the internal PT4 schema (for instance, tables like cash_hand_summary, ring_player_stats, etc.) or are corrupted.
Attempting to Create a New Database from PT4
From the same “Select Default Database” dialog, I clicked New and typed PT4_MAIN, host=localhost, port=5432, user=postgres (no password).
I receive this error:
pgsql
“Unable to create PostgreSQL database: PT4_MAIN
Reason: Error: Unable to execute query: Fatal Error;
Reason: ERROR: trailing junk after numeric literal at or near “1GROUP”
LINE 17: …mit, cash_hand_summary.cnt_players,FRO WHERE 1=11=1GROUP BY … ^”
This suggests PT4 is running an SQL script with malformed syntax (likely a leftover template containing 1=11=1GROUP stuck together).
Trying to Reconnect After Dropping Old Databases
I closed PT4.
In pgAdmin 4, I dropped every database whose name began with pt4_… (including pt4_main, pt4_mibase_2025, PT4 DB, pt4_template, etc.), leaving only postgres, template0, and template1.
I restarted the PostgreSQL service.
Reopened PT4 but still receive the same “trailing junk” error when creating the new database.
Firewall and Port Checks
I confirmed no firewall is blocking port 5432.
I added inbound/outbound rules in Windows Defender Firewall to allow TCP 5432 and allowed postgres.exe.
Despite this, PT4 still cannot create the database and throws the “This server is not responding to connection attempts” or the malformed SQL error.
In summary, PokerTracker 4 cannot create or connect to any valid database even though PostgreSQL 17 is running and I have removed all old remnants. The internal script that PT4 tries to execute to initialize the schema appears to be broken, leaving the installation unusable.
3. Request for Assistance
Could you please advise:
How to regenerate or fix the internal SQL script PT4 uses to create its tables, so that it does not contain the malformed condition 1=11=1GROUP?
If there is a corrupted “template” file that I need to remove manually (beyond just dropping databases in pgAdmin), or where I can obtain a fresh, clean version of that template for PG 17.
Any diagnostic tools or logs (advanced PT4 or PostgreSQL logs) I can check to pinpoint why the server is rejecting the creation commands.
An official step-by-step procedure (including any SQL scripts) that you recommend to force-create a brand-new PT4 database on PostgreSQL 17, bypassing conflicts with prior installations.
I have attached screenshots of each error dialog from PT4:
The “not a valid PokerTracker database” error when selecting preexisting databases.
The “trailing junk after numeric literal at or near ‘1GROUP’” error when attempting to create a new database.
The “This server is not responding to connection attempts” error after multiple reconfigurations.
I would appreciate any guidance or official solution you can provide. Thank you very much in advance for your help.
Kind regards,
