Re: pgsql: Fix thinko when bumping on temporary directories in pg_verify_ch

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Fix thinko when bumping on temporary directories in pg_verify_ch
Date: 2019-03-16 01:38:01
Message-ID: 20190316013801.GA22963@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Fri, Mar 15, 2019 at 10:09:57AM -0400, Robert Haas wrote:
> OK. My other gripe with this commit message is that it doesn't
> actually explain what problem was being fixed. You explain that it's
> wrong, and you explain why fixing it is not a big deal, but you never
> quite say what you're actually fixing.

I have re-read the commit log a couple of times, and I see your
point, sorry for the confusion. I should have added an extra
paragraph to mention that when pg_verify_checksums sees a directory
folder name which matches PG_TEMP_FILES_DIR when scanning all the
entries of a path for checksum verification, then it would return
immediately, skipping all the follow-up entries in this path,
potentially missing checks in a portion of files. The reason why it
is not a problem is actually that PG_TEMP_FILE_PREFIX and
PG_TEMP_FILES_DIR have the same value "pgsql_tmp", and that when
seeing an entry which matches PG_TEMP_FILE_PREFIX, then the scan of
the current folder would correctly move on to the next entry in the
current folder instead of simply returning and missing the next
entries.
--
Michael

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Meskes 2019-03-16 03:01:12 pgsql: Use correct connection name variable in ecpglib.
Previous Message Amit Kapila 2019-03-16 01:27:41 pgsql: Improve code comments in b0eaa4c51b.