Re: segmentation fault when cassert enabled

Jehan-Guillaume de Rorthais <jgdr@dalibo.com>

From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, vignesh C <vignesh21@gmail.com>, Petr Jelinek <petr.jelinek@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Peter Geoghegan <pg@bowt.ie>
Date: 2019-12-16T15:46:39Z
Lists: pgsql-hackers
On Mon, 16 Dec 2019 13:27:43 +0100
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

> On 2019-12-16 11:11, Amit Kapila wrote:
> > I agree that this is a timing issue.  I also don't see a way to write
> > a reproducible test for this.  However, I could reproduce it via
> > debugger consistently by following the below steps.  I have updated a
> > few comments and commit messages in the attached patch.
> > 
> > Peter E., Petr J or anyone else, do you have comments or objections on
> > this patch?  If none, then I am planning to commit (and backpatch)
> > this patch in a few days time.  
> 
> The patch seems fine to me.  Writing a test seems hard.  Let's skip it.
> 
> The commit message has a duplicate "building"/"built" in the first sentence.

I think the sentence is quite long. I had to re-read it to get it.

What about:

  This patch allows building the local relmap cache for a subscribed relation
  after processing pending invalidation messages and potential relcache
  updates.

Regards,



Commits

  1. Fix subscriber invalid memory access on DDL.

  2. Fix memory allocation mistake