pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Pepe TD Vo <pepevo@yahoo.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: slave stops replica
Date: Fri, 27 Aug 2021 17:09:58 +0200
Message-ID: <aaf2d9ed1a5e8b271bcc0d4bb6a577385a6bb45f.camel@cybertec.at> (raw)
In-Reply-To: <1948635055.176990.1630061761986@mail.yahoo.com>
References: <1415172523.18991.1630012160409.ref@mail.yahoo.com>
	<1415172523.18991.1630012160409@mail.yahoo.com>
	<1e79ea171debe2b3ed9c297989f110cfccdf129b.camel@cybertec.at>
	<1948635055.176990.1630061761986@mail.yahoo.com>

On Fri, 2021-08-27 at 10:56 +0000, Pepe TD Vo wrote:
> > > I had master slave replica and yesterday the slave server's device was full on /var
> > > where the archive copy from master.  After trying to figure out why the
> > > pg_archivecleanup doesn't work, SA removed all wal files except the  current
> > >
> > > I tried to create a test table on master and didn't see it pick up from slave.
> > > I found out again /var is full. 
> >
> > If you have deleted WAL that has no yet been applied to the standby, replication
> > is broken and you have to build the standby from scratch.
> 
> Can we delete the old WALs?

Only the ones you don't need for replication.
Of course, if you rebuild replication from scratch, you can delete the WAL archives.

> May I know what  is the retention to perform tuning on the server like Oracle to
> keep only 7 days and why pg_archivecleanup doesn't work?

I guess that pg_archivecleanup doesn't delete anything because it is only
called once replication has processed a WAL segment and doesn't need it any more.

If you are missing a WAL segment because you deleted it, replication gets stuck
at that point and will wait indefinitely for that WAL segment.  So nothing is
processedm and nothing is deleted.

A gap in the WAL will stop and break replication, as I said.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (4+ messages)

Message-ID: <aaf2d9ed1a5e8b271bcc0d4bb6a577385a6bb45f.camel@cybertec.at>
Permalink:  ../aaf2d9ed1a5e8b271bcc0d4bb6a577385a6bb45f.camel@cybertec.at/
Also on:    postgresql.org/message-id/aaf2d9ed1a5e8b271bcc0d4bb6a577385a6bb45f.camel@cybertec.at

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, pepevo@yahoo.com, pgsql-admin@lists.postgresql.org
  Subject: Re: slave stops replica
  In-Reply-To: <aaf2d9ed1a5e8b271bcc0d4bb6a577385a6bb45f.camel@cybertec.at>

* 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