Re: pgsql: Implement streaming mode in ReorderBuffer.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Implement streaming mode in ReorderBuffer.
Дата
Msg-id 2752962.1619568098@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Implement streaming mode in ReorderBuffer.  (Amit Kapila <akapila@postgresql.org>)
Ответы Re: pgsql: Implement streaming mode in ReorderBuffer.  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-committers
Amit Kapila <akapila@postgresql.org> writes:
> Implement streaming mode in ReorderBuffer.

I notice that new buildfarm member wrasse is unhappy about some of the
code added by this commit:

"/export/home/nm/farm/studio64v12_6/HEAD/pgsql.build/../pgsql/src/backend/replication/logical/reorderbuffer.c", line
2510:Warning: Likely null pointer dereference (*(curtxn+272)): ReorderBufferProcessTXN 

It's griping about this:

            curtxn->concurrent_abort = true;

and I think it's got a point.  There is little if any reason to have
confidence that curtxn must be non-NULL when this code is reached,
because it's in a PG_CATCH segment and there is a lot of code within
the PG_TRY that could throw an error before the spot where curtxn
is set.  Not to mention that curtxn is set only conditionally.

So I think

            if (curtxn)
                curtxn->concurrent_abort = true;

would be cheap insurance against a core dump.  Or maybe we should
do something else, but this seems really rickety as-is.

(wrasse seems to be generating boatloads of utterly useless warnings
otherwise, but after sifting through the chaff I did find this one.)

            regards, tom lane



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Improve logic in PostgresVersion.pm
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Fix pg_identify_object_as_address() with event triggers