Re: pg_verify_checksums failure with hash indexes

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: amit(dot)kapila16(at)gmail(dot)com, peter(dot)eisentraut(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_verify_checksums failure with hash indexes
Date: 2018-08-30 06:28:04
Message-ID: 20180830152804.a7c87ca78dfc140fa5e5a7d1@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 30 Aug 2018 15:01:24 +0900 (Tokyo Standard Time)
Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:

> At Wed, 29 Aug 2018 20:10:15 +0900, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> wrote in <20180829201015(dot)d9d4fde2748910e86a13c0da(at)sraoss(dot)co(dot)jp>
> > On Wed, 29 Aug 2018 16:01:53 +0530
> > Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > > > By the way, I think we can fix this also by clearing the header information of the last
> > > > page instead of setting a checksum to the unused page although I am not sure which way
> > > > is better.
> > > >
> > >
> > > I think that can complicate the WAL logging of this operation which we
> > > are able to deal easily with log_newpage and it sounds quite hacky.
> > > The fix I have posted seems better, but I am open to suggestions.
> >
> > Thank you for your explanation. I understood this way could make the
> > codes complicated, so I think the way you posted is better.
>
> FWIW, I confirmed that this is the only place where smgrextend
> for non-zero pages is not preceded by checksum calculation.

I also confirmed this. I didn't know calling PageSetChecksumInplace
before smgrextend for non-zero pages was a typical coding pattern.
Thanks.

Regards,
--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2018-08-30 06:28:17 Re: "Write amplification" is made worse by "getting tired" while inserting into nbtree secondary indexes (Was: Why B-Tree suffix truncation matters)
Previous Message Yugo Nagata 2018-08-30 06:18:09 Re: Fix comments of IndexInfo