RE: Unable to archive logs in standby server

From: Meera Nair <mnair(at)commvault(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: "guillaume(at)lelarge(dot)info" <guillaume(at)lelarge(dot)info>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, Punit Pranesh Koujalgi <pkoujalgi(at)commvault(dot)com>
Subject: RE: Unable to archive logs in standby server
Date: 2022-09-05 10:50:05
Message-ID: BY3PR19MB5219450A501FC5546FB6C160BA7F9@BY3PR19MB5219.namprd19.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Kyotaro,

This helped, thanks.

Regards,
Meera

-----Original Message-----
From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Sent: Monday, September 5, 2022 7:31 AM
To: Meera Nair <mnair(at)commvault(dot)com>
Cc: guillaume(at)lelarge(dot)info; pgsql-general(at)lists(dot)postgresql(dot)org; Punit Pranesh Koujalgi <pkoujalgi(at)commvault(dot)com>
Subject: Re: Unable to archive logs in standby server

External email. Inspect before opening.

At Tue, 30 Aug 2022 05:22:56 +0000, Meera Nair <mnair(at)commvault(dot)com> wrote in
> Hi Guillaume/team,
>
> I set archive_mode = always in master and standby.
> Archival to standby WAL directory completed when
>
> * standby server was restarted
> * pg_stop_backup was executed in master
>
> But archival hangs when pg_stop_backup is executed in standby.
> Could someone help to get this working?

https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2F12%2Fcontinuous-archiving.html&amp;data=05%7C01%7Cmnair%40commvault.com%7C240c3d6f31074e32206c08da8ee277fe%7C40ed1e38a16e46229d7c45161b6969d5%7C0%7C0%7C637979400603662396%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=UHsS8ZG1Vll0z8p3ce6WPfm3IniqVYMtOPfin3Lahbg%3D&amp;reserved=0

> In the same connection as before, issue the command:
>
> SELECT * FROM pg_stop_backup(false, true);
>
> This terminates backup mode. On a primary, it also performs an
> automatic switch to the next WAL segment. On a standby, it is not
> possible to automatically switch WAL segments, so you may wish to run
> pg_switch_wal on the primary to perform a manual switch. The reason
> for the switch is to arrange for the last WAL segment file written
> during the backup interval to be ready to archive.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matheus Martin 2022-09-05 13:52:04 Re: Missing query plan for auto_explain.
Previous Message hubert depesz lubaczewski 2022-09-05 10:05:35 Re: How to check if checkpoint is finished in sql script?