Re: Logical decoding fast-forward and slot advance

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Logical decoding fast-forward and slot advance
Дата
Msg-id CABUevEwL0yg_PbkDM2Koq0K4L8AANWNjYRKpW0oQ8PVHyUn7Yw@mail.gmail.com
обсуждение исходный текст
Ответ на Logical decoding fast-forward and slot advance  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Список pgsql-hackers
Hi!

Excellent! 

Just a quick note on my stab at it - it was physical only, which is more limited than this of course. My plan was to clean it up based on feedback in the next couple of days for the Jan cf, but with this submission in i think the effort is better directed there. I'll keep mine around as a backup in case something shows up with yours so it won't make it on time since mine is simpler. 

/Magnus 



On Dec 31, 2017 11:44, "Petr Jelinek" <petr.jelinek@2ndquadrant.com> wrote:
Hi,

Attached is patch which adds ability to do fast-forwarding while
decoding. That means wal is consumed as fast as possible and changes are
not given to output plugin for sending. The implementation is less
invasive than I originally though it would be. Most of it is just
additional filter condition in places where we would normally filter out
changes because we don't yet have full snapshot.

This is useful for multiple things. It enables us to do the replication
slot advance for both physical and logical slots, something that Magnus
took stab at some time ago, but does not seem like it went anywhere
(this is useful for replication tooling). This patch adds SQL visible
pg_replication_slot_advance() function for that use case.

It also makes second phase (after we reached SNAPBUILD_FULL_SNAPSHOT) of
replication slot creation faster, especially when there are big
transactions as the reorder buffer does not have to deal with data
changes and does not have to spill to disk.

And finally it will be useful for developing failover support of slots.

--
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Yugo Nagata
Дата:
Сообщение: Re: [HACKERS] [PATCH] Lockable views
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Faster inserts with mostly-monotonically increasing values