Re: Replication slots and footguns

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Replication slots and footguns
Date: 2014-03-12 20:33:14
Message-ID: 5320C48A.6070802@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/12/2014 12:26 PM, Andres Freund wrote:
> On 2014-03-12 12:23:01 -0700, Josh Berkus wrote:
>> On 03/12/2014 12:03 PM, Andres Freund wrote:
>>>> It seems like there's no way for a DBA to drop slots from the master if
>>>> it's rapidly running out of disk WAL space without doing a restart, and
>>>> there's no way to drop the slot for a replica which the DBA knows is
>>>> permanently offline but was connected earlier. Am I missing something?
>>>
>>> It's sufficient to terminate the walsender and then drop the slot. That
>>> seems ok for now?
>>
>> We have no safe way to terminate the walsender that I know of;
>> pg_terminate_backend() doesn't include walsenders last I checked.
>
> SELECT pg_terminate_backend(pid) FROM pg_stat_replication;

Aha! Ok, I'll work on some documentation.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-03-12 20:34:47 Re: Replication slots and footguns
Previous Message Peter Geoghegan 2014-03-12 20:10:37 Re: jsonb and nested hstore