From: Edson Richter <edsonrichter@hotmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: RE: It is possible to force periodically switch xlog?
Date: Thu, 2 Apr 2020 03:16:01 +0000
Message-ID: <MN2PR01MB5327D70442F2B0FA728FC81BCFC60@MN2PR01MB5327.prod.exchangelabs.com> (raw)
In-Reply-To: <20200402023859.GA10773@alvherre.pgsql>
References: <MN2PR01MB5327B3098D365954C49C907BCFC60@MN2PR01MB5327.prod.exchangelabs.com>
<20200402023859.GA10773@alvherre.pgsql>
________________________________
De: Alvaro Herrera <alvherre@2ndquadrant.com>
Enviado: quarta-feira, 1 de abril de 2020 23:38
Para: Edson Richter <edsonrichter@hotmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Assunto: Re: It is possible to force periodically switch xlog?
On 2020-Apr-02, Edson Richter wrote:
> Actually, I do have a stand by server I wish to update a bit more
> frequently in low traffic servers.
It is better to use streaming replication for that. Using the WAL
archive for that is an archaic mechanism now.
--
Álvaro Herrera https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.2ndQuadrant.com%2F&dat...
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Actually, I do use streaming 🙂
Our scenario is a bit more complex than ordinay wal archive or streaming.
With this setup we are able to backup 1.5 TB of data in less than 12 hours even with geographically distributted servers, and we have production.
1) We do have streaming from production to report server (geographically distributted)
2) Wal archive is setup from standby server to backup server (same location)
3) From time-to-time, we do barman backups from standby server (same location)
4) Twice a week, we restore every single database in a backup server to test backups.
Besides non standard, this setup is working really well for our needs.
But not everthing is shine like gold, and sometimes, for low traffic servers, barman complains not all wal segments were received.
Then we need to manually execute pg_switch_xlog at master, and after a "barman check-database" at backup server: this is what we would like to automate.
And it went well with a bash script and cron. At least, for 40 databases it is working really well.
Regards,
Edson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: edsonrichter@hotmail.com, alvherre@2ndquadrant.com
Subject: Re: It is possible to force periodically switch xlog?
In-Reply-To: <MN2PR01MB5327D70442F2B0FA728FC81BCFC60@MN2PR01MB5327.prod.exchangelabs.com>
References: <MN2PR01MB5327B3098D365954C49C907BCFC60@MN2PR01MB5327.prod.exchangelabs.com> <20200402023859.GA10773@alvherre.pgsql> <MN2PR01MB5327D70442F2B0FA728FC81BCFC60@MN2PR01MB5327.prod.exchangelabs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox