Re: Function to move the position of a replication slot

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Function to move the position of a replication slot
Date: 2017-05-04 12:45:49
Message-ID: CABUevEz8kg=8e1nqAhQCrdFvhYfCe914gvLgQ82vV9WBc=FtkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 4, 2017 at 2:42 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:

> On 4 May 2017 at 20:05, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> > PFA a patch that adds a new function, pg_move_replication_slot, that
> makes
> > it possible to move the location of a replication slot without actually
> > consuming all the WAL on it.
>
> > This can be useful for example to keep replication slots in sync between
> > different servers in a replication cluster.
>
> It needs a test to ensure it only operates on physical slots. It
> should ERROR on a logical slot, since it has no way of correctly
> advancing the catalog_xmin or finding a reasonable restart_lsn for
> logical decoding.
>

I guess that makes sense, yeah. I didn't try it with that :)

> I'm still fine with the name, since I plan to add that capability in
> pg11 by running through logical decoding and ReorderBufferSkip()ing
> each xact until we reach the target lsn.
>

Cool.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-05-04 12:50:35 Re: Function to move the position of a replication slot
Previous Message Craig Ringer 2017-05-04 12:42:26 Re: Function to move the position of a replication slot