pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: bhargav kamineni <bhargavpostgres@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Slot issues
Date: Sun, 14 Oct 2018 14:54:36 -0700
Message-ID: <20181014215436.ftdsmzyae4nxhadv@alap3.anarazel.de> (raw)
In-Reply-To: <CADCf-WO0cpcTTBm0qdEiQiq_8RRp4XvA77i8P9vZg2Y4aDFg4Q@mail.gmail.com>
References: <CADCf-WNXHaLEz+nJqkr4TWNgfiGV13jACrZD60HRf1CSU+8+Ng@mail.gmail.com>
	<20181014202042.gi6o3kitjvczc5ym@alap3.anarazel.de>
	<CADCf-WPFr7JbVjjbTdqisdWbBVKg8QUx1=c=Mpa20OyraDwUXQ@mail.gmail.com>
	<20181014211054.wxsekk3lqmdlacos@alap3.anarazel.de>
	<CADCf-WMtfReVtYPs_P3hpT5WibTy7Bm9oTSWAKq6VCiHufzZWw@mail.gmail.com>
	<20181014212432.tddouorjgpcpi6af@alap3.anarazel.de>
	<CADCf-WO0cpcTTBm0qdEiQiq_8RRp4XvA77i8P9vZg2Y4aDFg4Q@mail.gmail.com>

Hi,

On 2018-10-15 03:18:35 +0530, bhargav kamineni wrote:
> >  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...
> "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  ?

You can do that, but the nicer way probably is to just remove them via
sql once started.  Something like
SELECT pg_drop_replication_slot(slot_name) FROM pg_replication_slots;

Greetings,

Andres Freund




view thread (26+ messages)  latest in thread

Message-ID: <20181014215436.ftdsmzyae4nxhadv@alap3.anarazel.de>
Permalink:  ../20181014215436.ftdsmzyae4nxhadv@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20181014215436.ftdsmzyae4nxhadv@alap3.anarazel.de

 · 

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 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: andres@anarazel.de, bhargavpostgres@gmail.com
  Subject: Re: Slot issues
  In-Reply-To: <20181014215436.ftdsmzyae4nxhadv@alap3.anarazel.de>
  References: <CADCf-WNXHaLEz+nJqkr4TWNgfiGV13jACrZD60HRf1CSU+8+Ng@mail.gmail.com> <20181014202042.gi6o3kitjvczc5ym@alap3.anarazel.de> <CADCf-WPFr7JbVjjbTdqisdWbBVKg8QUx1=c=Mpa20OyraDwUXQ@mail.gmail.com> <20181014211054.wxsekk3lqmdlacos@alap3.anarazel.de> <CADCf-WMtfReVtYPs_P3hpT5WibTy7Bm9oTSWAKq6VCiHufzZWw@mail.gmail.com> <20181014212432.tddouorjgpcpi6af@alap3.anarazel.de> <CADCf-WO0cpcTTBm0qdEiQiq_8RRp4XvA77i8P9vZg2Y4aDFg4Q@mail.gmail.com> <20181014215436.ftdsmzyae4nxhadv@alap3.anarazel.de>

* 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