Re: xact_start for walsender & logical decoding not updated

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: xact_start for walsender & logical decoding not updated
Дата
Msg-id
20200108181205.GA3387@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
xact_start for walsender & logical decoding not updated Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: xact_start for walsender & logical decoding not updated Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Alvaro Herrera <alvherre@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Craig Ringer <craig@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: xact_start for walsender & logical decoding not updated Alvaro Herrera <alvherre@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Alvaro Herrera <alvherre@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Tom Lane <tgl@sss.pgh.pa.us>
Re: xact_start for walsender & logical decoding not updated Tom Lane <tgl@sss.pgh.pa.us>
Re: xact_start for walsender & logical decoding not updated Alvaro Herrera <alvherre@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Tom Lane <tgl@sss.pgh.pa.us>
Re: xact_start for walsender & logical decoding not updated Alvaro Herrera <alvherre@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Tom Lane <tgl@sss.pgh.pa.us>
Re: xact_start for walsender & logical decoding not updated Andres Freund <andres@anarazel.de>
Re: xact_start for walsender & logical decoding not updated Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: xact_start for walsender & logical decoding not updated Andres Freund <andres@anarazel.de>
On 2020-Jan-07, Tom Lane wrote:

> Alvaro Herrera  writes:
> > On 2020-Jan-07, Tom Lane wrote:

> > That seems a pretty simple patch; attached (untested).
> 
> I think you want && not ||, but otherwise that looks about right.

Thanks, you were right; pushed.

> > However, my
> > patch seemed a pretty decent way to achieve the goal, and I don't
> > understand why it causes the failure, or indeed why we care about
> > stmtStartTimestamp at all.  I'll look into this again tomorrow.
> 
> I'm not 100% sure why the failure either.  The assertion is in
> code that should only be reached in a parallel worker, and surely
> walsenders don't launch parallel queries?  But it looks to me
> that all the critters using force_parallel_mode are unhappy.

I reproduced here with force_parallel_mode=regress, and indeed what is
happening is that log.rep. subscription walsenders (???) are running
queries per commands/subscriptioncmds.c::fetch_table_list(), and under
that GUC they beget parallel workers; and because the parent has
am_walsender=true then they pass a timestamp of 0 to the children; but
the children retain am_walsender=false, so the assertion fires.

I didn't spend more time on that, but it seems strange and possibly
dangerous, since am_walsender is used to implement some restrictions.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-hackers по дате отправления
От: Alexander Korotkov
Дата:
От: Tom Lane
Дата:
FAQ