Re: Slot issues

From: bhargav kamineni <bhargavpostgres(at)gmail(dot)com>
To: andres(at)anarazel(dot)de
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Slot issues
Date: 2018-10-14 21:48:35
Message-ID: CADCf-WO0cpcTTBm0qdEiQiq_8RRp4XvA77i8P9vZg2Y4aDFg4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> You probably afterwards want to drop those slots from the new standby.
> See the following section from the docs:

>
https://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP-DATA
"It is often a good idea to also omit from the backup the files within the
cluster's pg_replslot/ directory, so that replication slots that exist on
the master do not become part of the backup. Otherwise, the subsequent use
of the backup to create a standby may result in indefinite retention of WAL
files on the standby, and possibly bloat on the master if hot standby
feedback is enabled, because the clients that are using those replication
slots will still be connecting to and updating the slots on the master, not
the standby. Even if the backup is only intended for use in creating a new
master, copying the replication slots isn't expected to be particularly
useful, since the contents of those slots will likely be badly out of date
by the time the new master comes on line."

Since i already synced the pg_repslot to standby ,Is it okay if i remove
the pg_repslot directory befor starting postgresql service ?

On Mon, 15 Oct 2018 at 02:54, Andres Freund <andres(at)anarazel(dot)de> wrote:

> Hi,
>
> As I just wrote:
> > On Mon, 15 Oct 2018 at 02:40, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > Please try to quote properly.
>
> On 2018-10-15 02:45:51 +0530, bhargav kamineni wrote:
> > Yeah i have used rsync , Got it now will increase the
> max_replication_slots
> > to high enough , Thank you Andres Freund :-)
>
> You probably afterwards want to drop those slots from the new standby.
> See the following section from the docs:
>
>
> https://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP-DATA
> "It is often a good idea to also omit from the backup the files within the
> cluster's pg_replslot/ directory, so that replication slots that exist on
> the master do not become part of the backup. Otherwise, the subsequent use
> of the backup to create a standby may result in indefinite retention of WAL
> files on the standby, and possibly bloat on the master if hot standby
> feedback is enabled, because the clients that are using those replication
> slots will still be connecting to and updating the slots on the master, not
> the standby. Even if the backup is only intended for use in creating a new
> master, copying the replication slots isn't expected to be particularly
> useful, since the contents of those slots will likely be badly out of date
> by the time the new master comes on line."
>
> Greetings,
>
> Andres Freund
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Krishna 2018-10-14 21:49:30 Re: Slot issues
Previous Message Andres Freund 2018-10-14 21:24:32 Re: Slot issues