pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <akapila@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Implement streaming mode in ReorderBuffer.
Date: Tue, 27 Apr 2021 20:01:38 -0400
Message-ID: <2752962.1619568098@sss.pgh.pa.us> (raw)
In-Reply-To: <E1k4Ebl-0006ps-1P@gemulon.postgresql.org>
References: <E1k4Ebl-0006ps-1P@gemulon.postgresql.org>

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





view thread (10+ messages)  latest in thread

Message-ID: <2752962.1619568098@sss.pgh.pa.us>
Permalink:  ../2752962.1619568098@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2752962.1619568098@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, akapila@postgresql.org
  Subject: Re: pgsql: Implement streaming mode in ReorderBuffer.
  In-Reply-To: <2752962.1619568098@sss.pgh.pa.us>
  References: <E1k4Ebl-0006ps-1P@gemulon.postgresql.org> <2752962.1619568098@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox