Re: pg13: xlogreader API adjust

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: alvherre(at)2ndquadrant(dot)com
Cc: michael(at)paquier(dot)xyz, bossartn(at)amazon(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)lists(dot)postgresql(dot)org, ah(at)cybertec(dot)at, andres(at)anarazel(dot)de
Subject: Re: pg13: xlogreader API adjust
Date: 2020-05-21 08:50:55
Message-ID: 20200521.175055.823511150159196268.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 15 May 2020 19:24:28 -0400, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote in
> On 2020-May-15, Michael Paquier wrote:
>
> > On Thu, May 14, 2020 at 02:12:25PM +0900, Kyotaro Horiguchi wrote:
> > > Good catch! That's not only for CreateDecodingContet. That happens
> > > everywhere in the query loop in PostgresMain() until logreader is
> > > initialized. So that also happens, for example, by starting logical
> > > replication using invalidated slot. Checking xlogreader != NULL in
> > > WalSndErrorCleanup is sufficient. It doesn't make actual difference,
> > > but the attached explicitly initialize the pointer with NULL.
> >
> > Alvaro, are you planning to look at that? Should we have an open item
> > for this matter?
>
> On it now. I'm trying to add a test for this (needs a small change to
> PostgresNode->psql), but I'm probably doing something stupid in the Perl
> side, because it doesn't detect things as well as I'd like. Still
> trying, but I may be asked to evict the office soon ...

FWIW, and I'm not sure which of the mail and the commit 1d3743023e was
earlier, but I confirmed that the committed test in
006_logical_decoding.pl causes a crash, and the crash is fixed by the
change of code.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2020-05-21 10:10:15 Re: proposal: schema variables
Previous Message Rushabh Lathia 2020-05-21 08:49:55 Re: some grammar refactoring