Troubleshooting PostgreSQL๐
Data migration to PostgreSQL 16 was interrupted๐
Note
Error information is displayed in the Eocortex Server Info utility window.
If there were problems when migrating data from PostgreSQL 12 to PostgreSQL 16:
Open the directory containing the PostgreSQL files:
C:\ProgramData\postgredb\
Delete the .migrated file.
Reinstall the Eocortex applications using the EocortexMainCommon Installer.exe file.
PostgreSQL service fails to start๐
In case of such an error, check the PostgreSQL logs. The logs should not mention the WAL Redo file, for example:
FATAL: ย could not create directory "pg_tblspc/16399": File exists
CONTEXT: ย WAL redo at 29/E1DDEC18 for XLOG/FPI_FOR_HINT:
LOG: ย startup process (PID 479752) exited with exit code 1
If there are logs with WAL Redo, clear the prerecord log using the command:
[path to Bin]/pg_resetwal -D [path to Data]
Example command on Windows for PostgreSQL 12:
cd "C:\Program Files\PostgreSQL\12\bin"
./pg_resetwal -D "C:\ProgramData\postgredb"
The paths to the Bin and Data directories for different operating systems are listed below.
Paths to the Bin directory๐
On Windows: C:\Program Files\PostgreSQL\[version]\bin
On Linux:
Debian, Ubuntu: /usr/lib/postgresql/[version]/bin
Paths to the Data directory๐
On Windows (PostgreSQL 12): C:\ProgramData\postgredb
On Windows (PostgreSQL 16): C:\ProgramData\postgredb16
Warning
When installing by running the EocortexMainCommon Installer.exe file, a different path can be specified. In this case, the location of the data can be found in the Registry Editor under the HKLM\SOFTWARE\PostgreSQL\Installations branch using the Data Directory key.
On Linux:
Debian, Ubuntu: /var/lib/postgresql/[version]/main
pgadmin4 application fails to start๐
An error when running the pgadmin4 application may occur when attempting to migrate data to a new version.
Solution:
Open the directory:
C:\Users\username\AppData\Roaming\pgAdmin
Find and rename the pgAdmin folder, for example, to pgAdmin_bak.
Restart the pgadmin4 application.
Unable to connect to PostgreSQL using pgadmin4 after installation๐
Open the directory containing the PostgreSQL configuration files.
C:\ProgramData\postgredb16\
Open the postgresql.conf file in a text editor.
Replace the line:
port = 5433
with:
port = 5432
Restart the postgresql-x64-16 service using the command line or the standard Services configuration tool.
Database synchronization for analytics modules is not operating๐
After updating, configure the pg_hba.conf file.
To do this:
Open the directory with PostgreSQL configuration files.
Default path for Windows:
C:\ProgramData\postgredb16\
Default path for Debian, Ubuntu:
/etc/postgresql/16/main/
In a text editor, open the postgresql.conf file and add a line similar to the following:
listen_addresses = '*'
The example above allows requests to be received through all available network adapters on the server. If it is necessary to restrict the list of adapters allowed to receive database requests, replace the /* symbol with the exact address of the network adapter.
Note
More details about this setting can be found in the PostgreSQL 16 documentation (see Connections and Authentication).
In a text editor, open the pg_hba.conf file and add a line similar to the following:
host all all 192.168.0.0/24 md5
The example above allows remote connection to all databases stored on the server for all users accessing from addresses in the 192.168.0.XXX range. If a different addressing scheme is used in the system network, the corresponding address range must be specified. Multiple lines with different address ranges are allowed.
Note
More details about this setting can be found in the PostgreSQL 16 documentation (see The pg_hba.conf File).
Restart the postgresql-x64-16 service using the command line or the standard Services configuration tool.