Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Michael Banck <michael(dot)banck(at)credativ(dot)de>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)
Date: 2018-08-29 12:09:03
Message-ID: 20180829210903.8e2c71dc7a1853c535869da1@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 29 Aug 2018 13:46:38 +0200
Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> On Wed, Aug 29, 2018 at 1:37 PM, Michael Banck <michael(dot)banck(at)credativ(dot)de>
> wrote:
>
> > Hi,
> >
> > On Wed, Aug 29, 2018 at 08:33:43PM +0900, Yugo Nagata wrote:
> > > On Wed, 29 Aug 2018 10:28:33 +0200
> > > Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> > > > > On 27 Aug 2018, at 14:05, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> wrote:
> > > > > On Mon, 27 Aug 2018 13:34:12 +0200
> > > > > Michael Banck <michael(dot)banck(at)credativ(dot)de> wrote:
> > > > >> On Mon, Aug 27, 2018 at 07:53:36PM +0900, Yugo Nagata wrote:
> > > > >>> On Fri, 24 Aug 2018 18:01:09 +0200
> > > > >>> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> > > > >>>> I'm curious about this option:
> > > > >>>>
> > > > >>>> -r RELFILENODE check only relation with specified
> > relfilenode
> > > > >>>>
> > > > >>>> but there is no facility to specify a database.
> > > > >>>>
> > > > >>>> Also, referring to the relfilenode of a mapped relation seems a
> > bit
> > > > >>>> inaccurate.
> > > > >>>>
> > > > >>>> Maybe reframing this in terms of the file name of the file you
> > want
> > > > >>>> checked would be better?
> > > > >>>
> > > > >>> If we specified 1234 to -r option, pg_verify_shceksums checks not
> > only 1234
> > > > >>> but also 1234_vm, 1234_fsm, and 1234.1, 1234.2, ... and so on, so
> > I think
> > > > >>> it makes senses to allow to specify a relfilenode instead of a
> > file name.
> > > > >>>
> > > > >>> I think it is reasonable to add a option to specify a database,
> > although
> > > > >>> I don't know which character is good because both -d and -D are
> > already used....
> > > > >>
> > > > >> Maybe the -d (debug) option should be revisited as well. Mentioning
> > > > >> every scanned block generates a huge amount of output which might be
> > > > >> useful during development but does not seem very useful for a stable
> > > > >> release. AFAICT there is no other debug output for now.
> > > > >>
> > > > >> So it could be renamed to -v (verbose) and only mention each scanned
> > > > >> file, e.g. (errors/checksum mismatches are still reported of
> > course).
> >
> > I still think this should be changed as well, i.e. -v should not report
> > every block scanned, as that really is debug output and IMO not useful
> > in general? AFAICT your page does not change the output at all, just
> > renames the option.
> >
> >
> I agree with this (though it's my fault initially :P). Per-page output is
> going to be useless in pretty much all production cases. It makes sense to
> also change it to be per-file.

I updated the patch to output only per-file information in the verbose mode.
Does this behavior match you expect?

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

Attachment Content-Type Size
01_pg_veriify_checksum_debug_to_verbose-v2.patch text/x-diff 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-08-29 12:10:51 Re: BUG #15346: Replica fails to start after the crash
Previous Message Amit Langote 2018-08-29 12:06:16 speeding up planning with partitions