Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: sulamul(at)gmail(dot)com
Cc: michael(at)paquier(dot)xyz, alvherre(at)alvh(dot)no-ip(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us, noah(at)leadboat(dot)com, neha(dot)sharma(at)enterprisedb(dot)com, amitlangote09(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb
Date: 2021-04-20 01:29:39
Message-ID: 20210420.102939.2243094329797303613.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Mon, 19 Apr 2021 16:27:25 +0530, Amul Sul <sulamul(at)gmail(dot)com> wrote in
> On Mon, Apr 19, 2021 at 2:05 PM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> > + smgrwrite(RelationGetSmgr(index), INIT_FORKNUM, BLOOM_METAPAGE_BLKNO,
> > (char *) metapage, true);
> > - log_newpage(&index->rd_smgr->smgr_rnode.node, INIT_FORKNUM,
> > + log_newpage(&(RelationGetSmgr(index))->smgr_rnode.node, INIT_FORKNUM,
> >
> > At the log_newpage, index is guaranteed to have rd_smgr. So I prefer
> > to leave the line alone.. I don't mind other sccessive calls if any
> > since what I don't like is the notation there.
> >
>
> Perhaps, isn't that bad. It is good to follow the practice of using
> RelationGetSmgr() for rd_smgr access, IMHO.

I don't mind RelationGetSmgr(index)->smgr_rnode alone or
&variable->member alone and there's not the previous call to
RelationGetSmgr just above. How about using a temporary variable?

SMgrRelation srel = RelationGetSmgr(index);
smgrwrite(srel, ...);
log_newpage(srel->..);

> > > P.S. commitfest entry https://commitfest.postgresql.org/33/3084/
> >
> > Isn't this a kind of open item?
> >
>
> Sorry, I didn't get you. Do I need to move this to some other bucket?

As discussed in the other branch, I agree that it is registered to the
next CF, not registered as an open items of this cycle.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas 'ads' Scherbaum 2021-04-20 01:38:33 Re: GSoC 2021 Proposal Document
Previous Message Kyotaro Horiguchi 2021-04-20 01:19:41 Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb