Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present

Поиск
Список
Период
Сортировка
От Michael Banck
Тема Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present
Дата
Msg-id 1506532559.22703.6.camel@credativ.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Hi,

Am Mittwoch, den 27.09.2017, 10:10 -0400 schrieb Peter Eisentraut:
> On 9/11/17 03:11, Michael Banck wrote:
> > So my patch only moves the slot creation slightly further forward,
> > AFAICT.
> 
> I have committed this patch, along with some associated cleanup.

Thanks!

> > AIUI, wal streaming always begins at last checkpoint and from my tests
> > the restart_lsn of the created replication slot is also before that
> > checkpoint's lsn. However, I hope somebody more familiar with the
> > WAL/replication slot code could comment on that.  What I dropped in the
> > refactoring is the RESERVE_WAL that used to be there when the temporary
> > slot gets created, I have readded that now.
> 
> I had to make some changes to that, because the way your patch was
> written it would use RESERVE_WAL also for the calls from pg_receivewal
> --create-slot, which would have been a behavior change.  So I added
> another argument to CreateReplicationSlot() to control that.

Euh right, thanks for catching that.

> > I also added a TAP test case that tries to check that the restart_lsn is
> > lower than the checkpoint_lsn, which appears to be the case.
> 
> I think that test was written incorrectly, because it didn't actually
> check the $checkpoint_lsn that it read.  I have not included that test
> in the committed patch.  Feel free to send another patch if you want to
> add more or different tests.

I will take a look at that.


Michael

-- 
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: michael.banck@credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with alot of columns