Backup Troubleshooting

Updated

PSQL0001: Unable to create a PostgreSQL instance

Symptom

Instance creation fails with the following error messages:

Invalid PostgreSQL User Name and Password.
    

OR

Connection to PostgreSQL server failed.
    

Cause 1

PostgresBrowseAgent.log shows the following error during instance creation:

7991 21550700 08/21 12:50:34 ### libpqInterface :: ConnectDb() - Connection Info string: port = '5432' dbname = 'postgres' user = 'pg_backup_agent' connect_timeout = '' password = **********
 7991 21550700 08/21 12:50:34 ### libpqInterface :: ValidateConnection() - eRRoR -- PQreset failed to reset the connection. Error:FATAL: no
 pg_hba.conf entry for host "[local]", user "pg_backup_agent", database "postgres", SSL off
 FATAL: no pg_hba.conf entry for host "[local]", user "pg_backup_agent", database "postgres", SSL off
    

Here "[local]" relates to a UNIX socket connection, and thus the pg_hba.conf file lacks an entry to enable the socket connection from cvd that spawns psql -u postgres [username] from working. This can be tested from the client as root.

Resolution 1

Ensure pg_hba.conf file has an applicable line to match the user. The default line below will allow all users to connect to the client via the UNIX socket, as part of a default PostgreSQL install. It may be hashed out.

local all all md5
    

Alternatively, you can use the variation below to make it secure:

local all [username_entered_in_gui_for_instance_creation] md5

This will allow the user to connect to all databases locally via the UNIX socket.

Cause 2

PostgresBrowseAgent.log shows the following error during instance creation:

18041 1184f700 09/28 18:57:36 ### libpqInterface :: libpqInterface() - eRRoR -- Exception in [libpqInterface :: libpqInterface]
 Type:[APPLICATION_EXCEPTION] Msg:[Lib dir is not present]
 18041 1184f700 09/28 18:57:36 ### ExecutePostgre::init() - eRRoR --
 Exception in [libpqInterface :: libpqInterface]
 Type:[APPLICATION_EXCEPTION] Msg:[Lib dir is not present]
 18041 1184f700 09/28 18:57:36 ### PostgresBrowseAgent::verifyUserInfo() -
 connection failed
 18041 1184f700 09/28 18:57:36 ### PostgresBrowseAgent::verifyUserInfo() -
 exepg.postgre_exe failed
    

Resolution 2

Ensure the correct PostgreSQL lib directory is entered in the instance creation dialog. It must contain libpq.so library file (and other related library files). It is used to connect to the database and execute queries.

  • To locate the lib directory, run the following command:

    bash-3.2# ./pg_config --libdir
        
    

    Example output:

    /PostgreSQL/9.2/lib
        
    

    If pg_config is not present which is installed as part of PostgreSQL install, run the following command (on UNIX clients):

    bash-3.2# locate libpq.so
        
    

    Example output:

    /PostgreSQL/9.2/lib/libpq.so
        
    
  • If the lib path contains libpq.so.x.x instead of libpq.so, create a symlink libpq.so to libpq.so.x.x before attempting instance creation.

    For example:

    On some setups libpq.so may not be present, but there will be a numbered version like libpq.so.4 or libpq.so.5.

    In this case, create a symlink version of libpq.so pointing to the numbered one:

    bash-3.2# ln -s /usr/lib64/libpq.so.x.x /usr/lib64/libpq.so
        
    

    You should be able to create instance successfully now.

Note

Library directory might differ for different setups. Find the proper library directory to create a soft link.

Cause 3

PostgresBrowseAgent.log shows the following error during instance creation:

24576 1026b700 09/28 23:10:39 ### PostgresBrowseAgent::verifyUserInfo() -
 m_PostgresServer->GetConfigFilePath() = Commvault
 24576 1026b700 09/28 23:10:39 ### libpqInterface :: ConnectDb() -
 Connection Info string: port = '5432' dbname = 'commvault' user = 'commvault'
 connection_timeout = '' password = **********
 24576 1026b700 09/28 23:10:39 ### libpqInterface :: IsSuperUser() - eRRoR
 - Exception in [libpqInterface :: IsSuperUser]
 Type:[APPLCATION_EXCEPTION] Msg:[The user is not a super user]
 24576 1026b700 09/28 23:10:39 ### libpqInterface :: libpqInterface() -
 eRRoR - Exception in [libpqInterface :: IsSuperUser]
 Type:[APPLCATION_EXCEPTION] Msg:[The user is not a super user]
 24576 1026b700 09/28 23:10:39 ###ExecutePostgre::init() - eRRoR -
 Exception in [libpqInterface :: IsSuperUser] ]
 Type:[APPLCATION_EXCEPTION] Msg:[The user is not a super user]
 24576 1026b700 09/28 23:10:39 ### PostgresBrowseeAgent::verifyUseerInfo()
 - connection failed
 24576 1026b700 09/28 23:10:39 ###PostgresBrowseeAgent::verifyUseerInfo()
 - exepg.postgre.exe failed
 24576 1026b700 09/28 23:10:39 ### PostgresBrowseeAgent::BrowseDBs() -
 verifyUser failed (err=)
 24576 1026b700 09/28 23:10:39 ### PostgresBrowseeAgent::DoBrowse() -
 BrowseDBs failed. M_errorNum = 1577058305
 24576 1026b700 09/28 23:10:39 ###
 PostgresBrowseeAgent::SendBrowseResponse() - Sending mstype =
 POSTGRESQL_BROWSE_FAILED
 24576 1026b700 09/28 23:10:39 ### Main() - DoBrowse() failed
    

Here, the user provided in the instance creation dialog box doesn't have the necessary usesuper or superuser attribute.

Resolution 3

Use the following steps to add the superuser attribute to the user:

  1. Once connected to PostgreSQL, run the following query to check if the usesuper attribute is incorrectly set:

    select * from pg_user;
        
    

    alter_user

    In the screenshot above, the commvault user has a f set against usesuper attribute. Instance creation using this user will therefore generate the above error.

  2. When connected to PostgreSQL as superuser, run the following query to add the attribute:

    PGSQL> ALTER USER username WITH superuser;
        
    
  3. Run the following query again to check if the attribute now shows a t against usesuper attribute.

    select * from pg_user;
        
    

Cause 4

PostgresBrowseAgent.log shows the following error during instance creation due to the PostgreSQL server connection failure.

25925 ae3d6740 03/06 16:35:25 ### libpqInterface :: ConnectDb() - Connection Info string: port = '5433' dbname = 'postgres' user = 'postgres' connect_timeout = ' password = **********
 25925 ae3d6740 03/06 16:35:25 ### libpqInterface :: ValidateConnection() - eRRoR -- PQreset failed to reset the connection. Error:FATAL: Peer authentication failed for user "postgres"
 FATAL: Peer authentication failed for user "postgres"
 25925 ae3d6740 03/06 16:35:25 ### libpqInterface :: ValidateConnection() - eRRoR -- Exception in [libpqInterface :: ValidateConnection] Type:[POSTGRE_EXCEPTION] Msg:[PQreset failed to reset the connection]
 25925 ae3d6740 03/06 16:35:25 ### libpqInterface :: libpqInterface() - eRRoR -- Exception in [libpqInterface :: ValidateConnection] Type:[POSTGRE_EXCEPTION] Msg:[PQreset failed to reset the connection]
 25925 ae3d6740 03/06 16:35:25 ### ExecutePostgre::init() - eRRoR -- Exception in [libpqInterface :: ValidateConnection] Type:[POSTGRE_EXCEPTION] Msg:[PQreset failed to reset the connection]
 25925 ae3d6740 03/06 16:35:25 ### PostgresBrowseAgent::verifyUserInfo() - connection failed
 25925 ae3d6740 03/06 16:35:25 ### PostgresBrowseAgent::verifyUserInfo() - exepg.postgre_exe failed
 25925 ae3d6740 03/06 16:35:25 ### PostgresBrowseAgent::BrowseDBs() - verifyUser failed (err=)
    

Resolution 4

During instance creation, the software tries to connect to the PostgreSQL server as a root user. So, for successful peer authentication, add the following mappings in the pg_hba.conf and the pg_ident.conf files.

PostgreSQL application uses the first record with a matching connection type, client address, requested database, and user name to perform authentication. So, this entry should be added before other entries, if any other record matches the same conditions.

  • In the pg_hba.conf file, add the corresponding map name configured for the Postgres DB user as shown in the example below.

    # TYPE    DATABASE    USER    ADDRESS    METHOD
     # "local" is for Unix domain socket connections only
       local    all    postgres    peer    map=testmap
        
    
  • In the pg_ident.conf file, add mapping between the PostGres DB user and the system user 'root' as shown in the example below.

    # Put your actual configuration here
     # ----------------------------------
     # MAPNAME    SYSTEM-USERNAME    PG-USERNAME
       testmap    postgres    postgres
       testmap    root    postgres
        
    
  • Now reload the PostgreSQL server using the following command:

    select pg_reload_conf();
        
    
  • Before you retry creating an instance, verify the connection to the PostgreSQL database server.

Cause 5

PostgresBrowseAgent.log shows the following error during instance creation on an AIX client:

8519792 1 02/25 14:58:06 ### libpqInterface :: LoadlibpqSymbols() - dlopen failed:Could not load module /opt/freeware/lib64/libpq.so. Dependent module /usr/lib/libcrypto.a(libcrypto.so.1.0.1) could not be loaded.
    

PostgreSQL libpq.so library fails to load due to dependency issues.

Resolution 5

  1. Copy the CvReIndexOpenSSL.sh script to the AIX client.

  2. From the AIX client, navigate to the location where you have copied the CvReIndexOpenSSL.sh script, and run the following command:

    CvReIndexOpenSSL.sh <PGSQL-INSTALLATION-DIR> <COMMVAULT-BASE-DIR>
        
    

    For example,

    ./CvReIndexOpenSSL.sh /opt/freeware /opt/CommVault/Base
        
    

    Parameter

    Description of Parameter Values

    PGSQL-INSTALLATION-DIR

    PostgreSQL installation directory

    COMMVAULT-BASE-DIR

    CommVault Base directory

  3. Restart Commvault services in the client.

PSQL0004: PostgreSQL backup operation fails due to incorrect Archive Log directory configuration

Symptom

Backup operation fails with the following error messages:

Error Code: [94:13]
 Description: PostgreSQL Database: [~WAL Archiving is NOT ENABLED. Please enable WAL Archiving for PostGres server.~] Data Backup Failed.
 Source: kmlinsnap, Process: PostGresBackupParent
    
2388 b24 02/14 21:30:07 279 PGLogBackup :: GenerateCollectFile() - eRRoR -- Exception in [PGLogBackup :: GenerateCollectFile] Type:[POSTGRE_EXCEPTION] Msg:[Some log files are missing from the WAL dir]
 2388 b24 02/14 21:30:07 279 PostGreLogBackupInterface() - eRRoR -- Exception in [PGLogBackup :: GenerateCollectFile] Type:[POSTGRE_EXCEPTION] Msg:[Some log files are missing from the WAL dir]
 2388 b24 02/14 21:30:07 279 PostGresClBackupBase::Initialize() - Error generating collect file
    

Cause

The backup operation fails with the following errors in the PostGresBackupChild.log file:

6178 aed88300 01/24 11:01:21 247081 PostGreFsBackupInterface() - Enter
 6178 aed88300 01/24 11:01:21 247081 libpqInterface :: ConnectDb() - Connection Info string: port = '5492' dbname = 'postgres' user = 'postgres' connect_timeout = '' password = **********
 6178 aed88300 01/24 11:01:21 247081 PGFsBackup :: IsWALArchivingEnabled() - eRRoR -- Exception in [PGFsBackup :: IsWALArchivingEnabled] Type:[POSTGRE_EXCEPTION] Msg:[WAL archiving is not enabled]
 6178 aed88300 01/24 11:01:21 247081 PGFsBackup :: PGFsBackup() - eRRoR -- Exception in [PGFsBackup :: IsWALArchivingEnabled] Type:[POSTGRE_EXCEPTION] Msg:[WAL archiving is not enabled]
 6178 aed88300 01/24 11:01:21 247081 PostGreFsBackupInterface() - eRRoR -- Exception in [PGFsBackup :: IsWALArchivingEnabled] Type:[POSTGRE_EXCEPTION] Msg:[WAL archiving is not enabled]
 6178 aed88300 01/24 11:01:21 247081 PostGresClBackupBase::Initialize() - Error generating collect file
 2072 9b8 12/10 10:10:29 21565 libpqInterface :: AnalyzeResult() - eRRoR -- PQresultStatus indicates failure for SHOW archive_mode. Error:ERROR: unrecognized configuration parameter "archive_mode"
 2072 9b8 12/10 10:10:29 21565 PGFsBackup :: IsWALArchivingEnabled() - Could not obtain the archive_mode setting.
 2072 9b8 12/10 10:10:29 21565 PGFsBackup :: IsWALArchivingEnabled() - eRRoR -- Either provide a WAL archive command or enable EmptyWalArchiveCommand
    

Resolution

  1. Check the permission for WAL directory. Postgres user and group should have read and write permissions to the WAL directory.

    drwx-------  15    postgres postgres    4096    Jan 28 12:20    data
    drwxrwxrwx    2    postgres postgres    4096    Jan 28 12:20    wal
        
    
  2. Check whether the Archive Log Directory configured in the PostgreSQL instance properties and the postgresql.conf file is the same.

  3. Follow all the checkpoints listed under Configuring the Archive Log Directory.

PSQL0005: FS based backup operation hangs due to incorrect permissions on the archive directory or incorrect archive command

Cause

FS backup copy operation can hang because the pg_stop_backup process hangs in the following cases:

  • There is an incorrect archive command specified in the 'postgresql.conf' file

  • There are incorrect permissions on the archive directory

  • There is insufficient free space in the volume or drive where archive log directory is present.

Resolution

Incorrect Archive Command
  1. Run the following query to identify the hung pg_stop_backup process.

    select datname,pid,usename,state,query from pg_stat_activity;
        
    

    For example,

    postgres=# select datname,pid,usename,state,query from pg_stat_activity;
     datname  | pid  | usename  | state | query
     postgres | 4903 | postgres | active | select pg_stop_backup();
     postgres | 5089 | postgres | active | select datname,pid,usename,wait
        
    

    For PostgreSQL version 9.5 or earlier, use the following query:

    select datname,pid,usename,waiting,state,query from pg_stat_activity;
        
    
  2. Run the following query to terminate the hung pg_stop_backup process.

    select pg_cancel_backend(<PID>);
        
    

    For example,

    postgres=# select pg_cancel_backend(4903);
     pg_cancel_backend
     -------------------
     t
     (1 row)
        
    

    For PostgreSQL version 9.5 or earlier, use the following query:

    select pg_cancel_backend(<procpid>);
        
    
  3. Correct the archive command in the postgresql.conf file.

    Example of a correct archive command

    archive_command = 'cp %p /vkm/PostgreSQL/9.3/wl/%f'
        
    
  4. Restart the PostgreSQL server.

  5. Verify that the archive command provided in the postgresql.conf file is correct. You can test this by running the following commands and verifying that they successfully complete.

    For PostgreSQL version 15 and more recent versions:

    select pg_backup_start('t', 'f');
    select pg_backup_stop();
        
    

    For PostgreSQL versions 9.5 through 15:

    select pg_start_backup(‘test’, 'f', 'f');
    select pg_stop_backup('f');
        
    

    For PostgreSQL versions older than 9.5:

    Select pg_start_backup(‘Testing’);
    Select pg_stop_backup();
        
    
  6. Run a full PostgreSQL FS based backup operation.

Incorrect Permission on the archive directory

Verify that the PostgreSQL server user has the read, and write permissions on the archive directory.

PSQL0008: PostgreSQL dump based backup operation may fail with failure connecting to socket file

Symptom

Instance creation fails with the following error message:

Connection to PostgreSQL Server failed. Please check that PostgreSQL Server is Online, and has enough resources for normal operation. Check logs for more details.
    

Backup operation fails with the following error message:

Error Code: [94:15]
    
Description: PostgreSQL Database: [~template1~] Data Backup Failed with PostgreSQL Error: [~pg_dump: [archiver (db)] connection to database "template1" failed: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? ~].
    

Cause

The instance creation or the backup operation might fail because UNIX socket directory is not /tmp.

You will find the following errors in the PostGresBrowseAgent.log file for backup:

2719 a9f 10/17 15:54:56 ### ValidateConnection() - eRRoR -- PQreset failed to reset the connection. Error:could not connect to server: No such file or directory
    
Is the server running locally and accepting
    
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
    
2719 a9f 10/17 15:54:56 ### ValidateConnection() - eRRoR -- Exception in [libpqInterface :: ValidateConnection] Type:[POSTGRE_EXCEPTION] Msg:[PQreset failed to reset the connection]
    
2719 a9f 10/17 15:54:56 ### libpqInterface() - eRRoR -- Exception in [libpqInterface :: ValidateConnection] Type:[POSTGRE_EXCEPTION] Msg:[PQreset failed to reset the connection]
    
2719 a9f 10/17 15:54:56 ### ExecutePostgre::init() - eRRoR -- Exception in [libpqInterface :: ValidateConnection] Type:[POSTGRE_EXCEPTION] Msg:[PQreset failed to reset the connection]
    
2719 a9f 10/17 15:54:56 ### PostgresBrowseAgent::verifyUserInfo() - connection failed
    

You will find the following errors in the PostGresBackupChild.log file for backup:

9800 d2387700 02/06 14:35:11 259550 PostGresBackupDb::writeFifo() - sh -c "/opt/PostgreSQL/9.0/bin/pg_dump -U postgres -Fc -b --port=5432 'template1' > /opt/install_dir/iDataAgent/jobResults/2/10087/pipe259550_9800" 1
    
9800 d2387700 02/06 14:35:11 259550 PostGresBackupDb::writeFifo() - System command [sh -c "/opt/PostgreSQL/9.0/bin/pg_dump -U postgres -Fc -b --port=5432 'template1' > /opt/install_dir/iDataAgent/jobResults/2/10087/pipe259550_9800"] failed, ret = 1 out=[] err=[pg_dump: [archiver (db)] connection to database "template1" failed: could not connect to server: No such file or directory
    
Is the server running locally and accepting
    
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
    
]
    
9800 eddc8740 02/06 14:35:11 259550 PostGresBackupDb::DoBackupDb() - result = failed
    
9800 eddc8740 02/06 14:35:11 259550 ::PostGresClBackupBase::DoBackupPostGres() - PostGresClBackupBase::DoBackup* returned error
    

Resolution

In the Instance Properties dialog box, enter the port number in <socket_file_path>:<port> format, and then restart the backup operation.

For example, if the socket file directory is /pg_socket/dir, and you are using port 5432, then type the port number as /pg_socket/dir:5432.

Symptom

The backup operation goes to pending state. [19:599]: Loss of control process PostGresBackup.exe. The outlined below are the possible causes:

  • The control process has unexpectedly died. Check crash dump or core file.

  • The communication to the control process machine (client1) is disrupted due to network errors.

  • If the machine (client1) is a cluster, it might have failed over.

  • The machine (client1) might have rebooted.

  • The Antivirus/Malware software might be blocking the process.

Cause

The availability of circular symbolic link for a folder or subfolder inside data directory. This causes FS based backup operation to fail.

For example:

/u02/app/postgres/pgdata/as14/data/pg_tblspc/16428 -> /u02/app/postgres/pgdata/as14/data_UC4/data
/u02/app/postgres/pgdata/as14/data_UC4/data/data -> /u02/app/postgres/pgdata/as14/data
    

Resolution

Remove the circular symbolic link and try to backup again.

PSQL0011: Dump based backup operation fails for PostgreSQL version 8.2 on Windows

Symptom

Dump based backups for PostgreSQL version 8.2 on Windows fail with below error:

PostgreSQL Database: [~Tar Dump format is not supported for PostgreSQL version '8.2'. You need to set registry keys; 'sPGCompDump' , 'sPGStagingDir' to enable Compressed Dump Format. Please refer to the Documentation for more details.~] Data Backup Failed.
    

Cause

Dump based backup operation is performed using the –Ft option that provides the dump output in Tar format.

Resolution

Create the additional setting sPGCompDump and set its value as Y. This provides the dump in a compressed output format and the dump is staged at the job results folder by default.

You can change the staging location by creating additional setting sPGStagingDir and setting its value as the new staging location.

For instructions on adding the additional setting from the CommCell Console, see Add or Modify an Additional Setting.

PSQL0012: Dump based backup operation fails for table size greater than 8GB

Symptom

PostgreSQL dump based backup for table size greater than 8GB fails with the below error:

PostgreSQL Database: [~Tar Dump format is not supported if table size is more than 8GB. You need to set registry keys; 'sPGCompDump' , 'sPGStagingDir' to enable compressed dump format. Please refer to the Documentation for more details.~] Data Backup Failed.
    

Cause

Tar format has a limit of 8 GB for backing up individual tables.

Resolution

Create the additional setting sPGCompDump and set its value as Y. This provides the dump in a compressed output format and the dump is staged at the job results folder by default during backups and restores.

You can change the staging location by creating additional setting sPGStagingDir and setting its value as the new staging location.

For instructions on adding the additional setting from the CommCell Console, see Add or Modify an Additional Setting.

PSQL0015: FS based backup operation might complete with errors if a file is missing during a backup operation

Symptom

PostgreSQL FS based backup operation might complete with errors if a file is missing during a backup operation.

The following error will appear in the PostGresBackupChild.log file:

32452 7ec4 08/11 14:54:05 826323 ClBackupFile::OpenFilesForBackup(6168) - failed to stat path '/opt/postgres/log/as11/pg_wal/archive_status/00000004000000AD00000013.ready' 2
    
32452 7ec4 08/11 14:54:05 826323 ClBackupFile::OpenFilesForBackup(6226) - lstat(/opt/postgres/log/as11/pg_wal/archive_status/00000004000000AD00000013.ready) failed error=[2]
    

Cause 1

By default, we ignore files missing from the below folders during a backup operation:

  • pg_subtrans

  • pgsql_tmp

  • pg_clog

  • pg_xact

Even if files in these folders is missing, the backup operation is marked as completed.

The backup operation is marked as "completed with errors" if the file that failed to get backed up does not belong to any one of these folders.

Note:

The following registry key values can be used in different cases:

Registry key value

Use case

dir_name

Ignores the files in the /**/dir_name/ location that failed to back up.

For example, if you set the registry key to archive_status, the Commvault software ignores the files that failed to back up in the /opt/postgres/data/as11/pg_wal/archive_status location.

dir_name/sub_dir

Ignores the files in the /**/dir_name/sub_dir/ location

For example, if you set the registry key to base/1021, the Commvault software ignores the files in the /opt/postgres/data/as11/base/1021 location.

dir_name/**

Ignores the files missing in the sub directory /**/dir_name/**/

For example, if you set the registry key to base/1021/**, the Commvault software ignores the files missing in all the sub directories that are in the /opt/postgres/data/as11/base/1021 location.

Resolution 1

Caution

The following procedure could lead to data loss if performed without due consideration. Use these steps only when the ignored files do not affect restore operation.

You can ignore failed files inside a data directory during a backup operation by creating the sPGDirIgnoreList additional setting as shown in the following table. The backup operation will be marked as successful.

For instructions on how to add additional settings from the CommCell Console, see Adding or Modifying Additional Settings from the CommCell Console.

Property

Value

Name

sPGDirIgnoreList

Category

PostGres

Type

String

Value

Name of the file that needs to be ignored or the name of the folders inside the data directory where you want to ignore failed files during a backup operation. The values can be comma separated.

For example, we can add the following directories to the additional setting if we want to ignore the failed files present in these folders:

Property

Value

Name

sPGDirIgnoreList

Category

PostGres

Type

String

Value

dir1, dir2, file1

where:

full path of dir1 is /data_directory/dir1

full path of dir2 is /data_directory/path1/dir2

full path of file1 is /data_directory/dir3/file1

Cause 2

When pg_wal or pg_xlog files are outside the data directory, backup operation completes with errors. These are temporary files which might be there during scan and collect file creation, but removed during backup by the PostgreSQL application.

Resolution 2

You can ignore failed files inside archive status during a backup operation by creating the sPGDirIgnoreList additional setting as shown in the following table. The backup operation will be marked as successful.

For instructions on how to add additional settings from the CommCell Console, see Adding or Modifying Additional Settings from the CommCell Console.

Property

Value

Name

sPGDirIgnoreList

Category

PostGres

Type

String

Value

archive_status

PSQL0017: Unable to Associate a PostgreSQL Client to a Storage Policy

Symptom

Unable to associate a PostgreSQL client to a storage policy.

Cause

The log storage policy is set for dump based subclients.

Resolution

  1. Download the modify_subclient_template.xml file and save it on the computer from where the command will be executed.

  2. To set the log storage policy to the default log storage policy, execute the following command in the CommServe after substituting the parameters values.

    qoperation execute –af modify_subclient_template.xml -appName 'PostgreSQL' -entity/clientName 'client_name' -instanceName 'instance_name' –backupsetName 'DumpBasedBackupSet' –subclientName 'subclient_name' -LogBackupStoragePolicy/storagePolicyName 'CV_DEFAULT'

PSQL0018: PostgreSQL log backup fails for Postgres Plus Advanced Server version 9.0

Symptom

PostgreSQL log backup fails for Postgres Plus® Advanced Server version 9.0.

Cause

Postgres Plus® Advanced Server version 9.0 has WAL segment size of 128 GB. But internally it is using 16 MB and log segment files are 16 MB. This is causing incorrect WAL log numbers to be generated, resulting in log backup failure.

Resolution

Create the sWalSegmentSize additional setting as shown in the following table.

For instructions on how to add additional settings from the CommCell Console, see Adding or Modifying Additional Settings from the CommCell Console.

Property

Value

Name

sWalSegmentSize

Category

PostGres

Type

String

Value

16 MB

PSQL0019: PostgreSQL backup from a standby node fails

Symptom

PostgreSQL backup from a standby node fails with the following error message:

Master role is not correct. Please reset in instance properties and run the job again.
    

Cause

Standby node in the CommServe database might have corrupted.

Resolution

You need to reconfigure the standby node settings. First deconfigure the standby node association by selecting a different secondary instance and save the settings. Then, reconfigure the node with the correct instance.

PSQL0020: DumpBased backups on Windows client might fail if there is no space available in Windows temporary directory.

Symptom

Commvault backups, by default, perform pg_dump in windows client using tar format (-Ft).

This doesnot require staging from Commvault side, but Postgresql application uses the system temporary directory as a staging folder for temporary files while generating tar-based dump files (typically C:\temp folder).

If there is no space available in Windows temporary directory, the Dumpbased backups will fail with below error in PostGresBackup.log:

4640  15a8  08/18 00:44:20 115968 PostGresBackupDb::DoBackupDbUsingPipe() - Command [cmd.exe /c ""C:\Program Files\PostgreSQL\10\bin\pg_dump.exe" -U postgres -Ft -b  --lock-wait-timeout=60000  --port=5432 "dbname='gk10'" 2> "C:\Program Files\Commvault\ContentStore\iDataAgent\JobResults\CV_JobResults\2\0\115968\CV_Postgres_Error.out""] failed, Error = [pg_dump: [tar archiver] could not write to output file: No space left on device]. Check [C:\Program Files\Commvault\ContentStore\iDataAgent\JobResults\CV_JobResults\2\0\115968\CV_Postgres_Error.out] for detail error
    

Cause

There was no space available in Windows temporary directory.

Resolution

Allocate a different folder with ample space to accommodate these temporary files by setting an additional setting sPgDumpTempDirectory. Set its value to the full path of the preferred directory.

Or

You have the option to utilize the sPGCompDump additional setting, which generates a database dump in a compressed output format (-Fc). By default, the resulting dump is placed in the job results folder. This specific format requires the staging of the dump output before transferring it to the media agent. If you wish to modify the staging location, you can set an additional setting called sPGStagingDir and assign it to the desired new staging location.

Was this page helpful?