Re: [HACKERS] Function to move the position of a replication slot

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] Function to move the position of a replication slot
Дата
Msg-id 20170902222812.e7qcfxqpuuvf726x@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Function to move the position of a replication slot  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Function to move the position of a replication slot  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2017-09-01 23:37:07 -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> > On 8/31/17 08:19, Magnus Hagander wrote:
> >> I think that, in the end, covered all the comments?
> 
> > I didn't see any explanation of what this would actually be useful for.
> > I suppose you could skip over some changes you don't want replicated,
> > but how do you find to what position to skip?
> 
> Um ... I can see how you might expect to skip some events in a logical
> replication stream and have a chance of things not being utterly broken.
> But how can that work for physical replication?  Missed updates are
> normally spelled "unrecoverable data corruption" at that level.

Consider e.g. a standby that follows master, but isn't a target for a
failover. It can make a fair bit of sense to script things so that
there's also a slot on the standby that's marked to be the primary in
disaster cases. For that you might want to forward the slot on a regular
basis.

I don't quite see how you'd get corruption from a physical slot being
forwarded? I mean you surely can get into the situation that there's
missing WAL from wherever a standby is receiving its WAL, but that'll
"just" break replication.

- Andres



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Parallel worker error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Function to move the position of a replication slot