Re: analyze-in-stages post upgrade questions

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Mircea Cadariu <cadariu(dot)mircea(at)gmail(dot)com>, "Zechman, Derek S" <Derek(dot)S(dot)Zechman(at)snapon(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: analyze-in-stages post upgrade questions
Date: 2025-07-11 09:51:30
Message-ID: 2c1f1834107045dfa8b32417771b56bab0cffc56.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

[moving to pgsql-hackers]
On Thu, 2025-07-10 at 17:20 +0100, Mircea Cadariu wrote:
> I have only one suggestion for the patch. Consider adding a
> corresponding test in src/bin/scripts/t/100_vacuumdb.pl.
>
> Proposal (I used this to check the patch):
>
> $node->safe_psql('postgres',
>     "CREATE TABLE parent_table (a INT) PARTITION BY LIST (a);\n"
>       . "CREATE TABLE child_table PARTITION OF parent_table FOR VALUES
> IN (1);\n"
>       . "INSERT INTO parent_table VALUES (1);\n");
> $node->issues_sql_like(
>     [
>         'vacuumdb', '--analyze-only', 'postgres'
>     ],
>     qr/statement:\s+ANALYZE\s+public\.parent_table/s,
>     '--analyze_only updates statistics for partitioned tables');

Good idea; done in the attached version 2 of the patch.

Yours,
Laurenz Albe

Attachment Content-Type Size
v2-0001-Make-vacuumdb-Z-process-partitioned-tables.patch text/x-patch 4.0 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mircea Cadariu 2025-07-11 10:42:44 Re: analyze-in-stages post upgrade questions
Previous Message Dominique Devienne 2025-07-11 09:10:58 Re: Aggregate versions of hashing functions (md5, sha1, etc...)

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2025-07-11 09:56:28 Re: What is a typical precision of gettimeofday()?
Previous Message Shinya Kato 2025-07-11 09:37:56 Re: vacuumlazy: Modernize count_nondeletable_pages