RE: Unable to archive logs in standby server - Mailing list pgsql-general

From Meera Nair
Subject RE: Unable to archive logs in standby server
Date
Msg-id BY3PR19MB52190C5F78D63B7C8AB1CED7BA7A9@BY3PR19MB5219.namprd19.prod.outlook.com
Whole thread Raw
In response to Re: Unable to archive logs in standby server  (Christophe Pettus <xof@thebuild.com>)
List pgsql-general
Hi Christophe,

If pg_stop_backup is executed in master OR if standby server is restarted, I can see the archiving completing fine.
Only issue is while manually executing the pg_stop_backup in standby

Regards,
Meera

-----Original Message-----
From: Christophe Pettus <xof@thebuild.com>
Sent: Friday, September 2, 2022 7:43 PM
To: Meera Nair <mnair@commvault.com>
Cc: pgsql-general@lists.postgresql.org; Punit Pranesh Koujalgi <pkoujalgi@commvault.com>
Subject: Re: Unable to archive logs in standby server

External email. Inspect before opening.



> On Sep 1, 2022, at 21:41, Meera Nair <mnair@commvault.com> wrote:
> Archival hangs. Is this expected?
> postgres=# select pg_start_backup('test', true, false);
> pg_start_backup
> -----------------
> 1/F9000060
> (1 row)
>
> postgres=# select pg_stop_backup('f');
> NOTICE:  base backup done, waiting for required WAL segments to be
> archived
> WARNING:  still waiting for all required WAL segments to be archived
> (60 seconds elapsed)
> HINT:  Check that your archive_command is executing properly.  You can safely cancel this backup, but the database
backupwill not be usable without all the WAL segments. 
> WARNING:  still waiting for all required WAL segments to be archived
> (120 seconds elapsed)
> HINT:  Check that your archive_command is executing properly.  You can safely cancel this backup, but the database
backupwill not be usable without all the WAL segments. 

This generally means the command being run by archive_command is failing.  Check the PostgreSQL logs (if you are using
CSVlogs, check the *.log file rather than the *.csv file). 



pgsql-general by date:

Previous
From: Jeffrey Walton
Date:
Subject: Re: How to make PostreSQL utilities honor home directories?
Next
From: Jeffrey Walton
Date:
Subject: Determine if a user and database are available