From: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Erik Rijkers <er(at)xs4all(dot)nl>, Peter Geoghegan <pg(at)bowt(dot)ie>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Stephen Frost <sfrost(at)snowman(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, Amul Sul <sulamul(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_amcheck contrib application |
Date: | 2021-03-12 23:32:03 |
Message-ID: | 64A9DE63-2624-440B-A99B-BEDB0D98F957@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Mar 12, 2021, at 11:24 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Fri, Mar 12, 2021 at 2:05 PM <er(at)xs4all(dot)nl> wrote:
>> I think there is a formatting glitch in lines like:
>>
>> 2/4 relations (50%) 187977/187978 pages (99%), (testdb )
>>
>> I suppose that last part should show up trimmed as '(testdb)', right?
>
> Actually I think this is intentional. The idea is that as the line is
> rewritten we don't want the close-paren to move around. It's the same
> thing pg_basebackup does with its progress reporting.
>
> Now that is not to say that some other behavior might not be better,
> just that Mark was copying something that already exists, probably
> because he knows that I'm finnicky about consistency....
I think Erik's test case only checked one database, which might be why it looked odd to him. But consider:
pg_amcheck -d foo -d bar -d myreallylongdatabasename -d myshortername -d baz --progress
The tool will respect your database ordering, and check foo, then bar, etc. If you have --jobs greater than one, it will start checking some relations in bar before finishing all relations in foo, but with a fudge factor, pg_amcheck can report that the processing has moved on to database bar, etc.
You wouldn't want the parens to jump around when the long database names get processed. So it keeps the parens in the same location, space pads shorter database names, and truncates overlong database names.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2021-03-12 23:33:36 | Re: GROUP BY DISTINCT |
Previous Message | Mark Dilger | 2021-03-12 23:24:32 | Re: pg_amcheck contrib application |