Re: [HACKERS] Function to control physical replication slot

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] Function to control physical replication slot
Дата
Msg-id 20170413004039.nd7fsogp4qwt5hlx@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Function to control physical replication slot  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] Function to control physical replication slot
Список pgsql-hackers
On 2017-04-12 20:15:52 -0400, Peter Eisentraut wrote:
> On 4/11/17 05:15, Magnus Hagander wrote:
> > Is there a particular reason we don't have a function to *set* the
> > restart_lsn of a replication slot, other than to drop it and recreate it?
> 
> I suppose there could be lots of problems if the LSN you specify isn't
> valid.  And it might be hard to determine whether a given LSN is valid.

As long as we're only talking about the LSN of a physical slot (and not
the xmin) I'm not sure it's that important that it's valid, as long as
it's not in the future.  But we could otherwise pretty easily assert
that the new value has to be old_value <= new_value <=
GetRedoRecPtr()/GetFlushRecPtr().  That should be sufficient for both of
your use-cases afaics?

- Andres



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Partitioned tables and relfilenode
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table