Re: Progress reporting for pg_verify_checksums

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Banck <michael.banck@credativ.de>
Cc: Michael Paquier <michael@paquier.xyz>, Fabien COELHO <coelho@cri.ensmp.fr>, Thomas Munro <thomas.munro@enterprisedb.com>, Bernd Helmle <bernd.helmle@credativ.de>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-18T14:18:26Z
Lists: pgsql-hackers
On 2019-Feb-17, Michael Banck wrote:

> +	/*
> +	 * As progress status information may be requested, we need to scan the
> +	 * directory tree(s) twice, once to get the idea how much data we need to
> +	 * scan and finally to do the real legwork.
> +	 */
> +	total_size = scan_directory(DataDir, "global", true);
> +	total_size += scan_directory(DataDir, "base", true);
> +	total_size += scan_directory(DataDir, "pg_tblspc", true);

Surely we know at that point whether this first scan is needed, and we
can skip it if not?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Add progress reporting to pg_checksums

  2. Fix thinko when bumping on temporary directories in pg_verify_checksums

  3. Fix thinko when bumping on temporary directories in pg_checksums