Re: Progress reporting for pg_verify_checksums - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Progress reporting for pg_verify_checksums
Date
Msg-id 20190218141826.GA3173@alvherre.pgsql
Whole thread Raw
In response to Re: Progress reporting for pg_verify_checksums  (Michael Banck <michael.banck@credativ.de>)
Responses Re: Progress reporting for pg_verify_checksums
List 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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: libpq environment variables in the server
Next
From: Antonin Houska
Date:
Subject: Re: Problems with plan estimates in postgres_fdw