Re: Rework LogicalOutputPluginWriterUpdateProgress

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Rework LogicalOutputPluginWriterUpdateProgress
Дата
Msg-id CAA4eK1LKxS6p=RQdHZSxTgO_r=kwRcQ0SEz6orMZUW06ZzRkww@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Rework LogicalOutputPluginWriterUpdateProgress  (Andres Freund <andres@anarazel.de>)
Ответы Re: Rework LogicalOutputPluginWriterUpdateProgress  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sat, Feb 11, 2023 at 3:04 AM Andres Freund <andres@anarazel.de> wrote:
>
> > One difference I see with the patch is that I think we will end up
> > sending keepalive for empty prepared transactions even though we don't
> > skip sending begin/prepare messages for those.
>
> With the proposed approach we reliably know whether a callback wrote
> something, so we can tune the behaviour here fairly easily.
>

I would like to clarify a few things about the proposed approach. In
commit_cb_wrapper()/prepare_cb_wrapper(), the patch first did
ctx->did_write = false;, then call the commit/prepare callback (which
will call pgoutput_commit_txn()/pgoutput_prepare_txn()) and then call
update_progress() which will make decisions based on ctx->did_write
flag. Now, for this to work pgoutput_commit_txn/pgoutput_prepare_txn
should know that the transaction has performed some writes before that
call which is currently working because pgoutput is tracking the same
via sent_begin_txn. Is the intention here that we still track whether
BEGIN () has been sent via pgoutput?

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Exit walsender before confirming remote flush in logical replication