pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Lou Tseng <ltseng@advancedpricing.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Lingering replication slots
Date: Wed, 3 Apr 2019 09:27:10 -0700
Message-ID: <48619cc6-a89d-6fd7-07f1-580a8effb607@aklaver.com> (raw)
In-Reply-To: <DM6PR11MB293905A4056E632A36C421EEC4570@DM6PR11MB2939.namprd11.prod.outlook.com>
References: <DM6PR11MB293905A4056E632A36C421EEC4570@DM6PR11MB2939.namprd11.prod.outlook.com>

On 4/3/19 9:01 AM, Lou Tseng wrote:
> Hi,
> 
> A newbie question: how do I delete lingering replication slots?  When 
> creating Subscription for logical replication, the CREATE SUBSCRIPTION 
> stuck and didn't return. After ctrl-c and aborted the command, the 
> master database have lingering replication slots that I can't delete 
> because the active is true. Do I just kill the pid?
> 
> Thanks!
> 
> 
> SELECT * FROM pg_replication_slots ;
> 
> slot_name |plugin| slot_type |datoid|database| temporary | active | 
> active_pid | xmin | catalog_xmin | restart_lsn| confirmed_flush_lsn
> 
> --------------+----------+-----------+----------+----------------+-----------+--------+------------+------+--------------+--------------+---------------------
> 
> support_sub2 | pgoutput | logical | 28384483 | dragon_support | f | 
> t|29566 || 96562907 | 5108/29C1610 |
> 
> support_sub| pgoutput | logical | 28384483 | dragon_support | f | 
> t|27253 || 96562907 | 5108/2858880 |
> 


See below(read full description at link):

https://www.postgresql.org/docs/11/functions-admin.html#FUNCTIONS-REPLICATION

pg_drop_replication_slot(slot_name name)


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (3+ messages)  latest in thread

Message-ID: <48619cc6-a89d-6fd7-07f1-580a8effb607@aklaver.com>
Permalink:  ../48619cc6-a89d-6fd7-07f1-580a8effb607@aklaver.com/
Also on:    postgresql.org/message-id/48619cc6-a89d-6fd7-07f1-580a8effb607@aklaver.com

 · 

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: adrian.klaver@aklaver.com, ltseng@advancedpricing.com
  Subject: Re: Lingering replication slots
  In-Reply-To: <48619cc6-a89d-6fd7-07f1-580a8effb607@aklaver.com>
  References: <DM6PR11MB293905A4056E632A36C421EEC4570@DM6PR11MB2939.namprd11.prod.outlook.com> <48619cc6-a89d-6fd7-07f1-580a8effb607@aklaver.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