Re: Issues in Replication Progress Tracking

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Issues in Replication Progress Tracking
Дата
Msg-id CAA4eK1LbtWktw8ZxJcs231gRC4gukjPi42ErX=Usra5BBY7=-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issues in Replication Progress Tracking  (Andres Freund <andres@anarazel.de>)
Ответы Re: Issues in Replication Progress Tracking  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, May 21, 2015 at 12:42 AM, Andres Freund <andres@anarazel.de> wrote:
>
> On 2015-05-20 19:27:05 +0530, Amit Kapila wrote:
>
> > 13.
> > In function replorigin_session_setup() and or
> > replorigin_session_advance(), don't we need to WAL log the
> > use of Replication state?
>
> No, the point is that the replication progress is persisted via an extra
> data block in the commit record. That's important for both performance
> and correctness, because otherwise it gets hard to tie a transaction
> made during replay with the update to the progress. Unless you use 2PC
> which isn't really an alternative.
>

Okay, but what triggered this question was the difference of those functions
as compare to when user call function pg_replication_origin_advance().
pg_replication_origin_advance() will WAL log the information during that
function call itself (via replorigin_advance()).  So even if the transaction
issuing pg_replication_origin_advance() function will abort, it will still update
the Replication State, why so?


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Typo in tablecmds.c
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: recovery_target_action doesn't work for anything but shutdown