From: | Gilles Darold <gilles(at)migops(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Robert Treat <rob(at)xzilla(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [Proposal] vacuumdb --schema only |
Date: | 2022-04-14 20:27:46 |
Message-ID: | 0b9f8a13-01ec-5e30-8d23-50ee3e7bf2d2@migops.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Le 11/04/2022 à 20:37, Nathan Bossart a écrit :
> On Fri, Apr 08, 2022 at 05:16:06PM +0200, Gilles Darold wrote:
>> Attached v7 of the patch that should pass cfbot.
> Thanks for the new patch! Unfortunately, it looks like some recent changes
> have broken it again.
>
>> +enum trivalue schema_is_exclude = TRI_DEFAULT;
>> +
>> +/*
>> + * The kind of object filter to use. '0': none, 'n': schema, 't': table
>> + * these values correspond to the -n | -N and -t command line options.
>> + */
>> +char objfilter = '0';
> I think these should be combined into a single enum for simplicity and
> readability (e.g., OBJFILTER_NONE, OBJFILTER_INCLUDE_SCHEMA,
> OBJFILTER_EXCLUDE_SCHEMA, OBJFILTER_TABLE).
>
>> * Instead, let the server decide whether a given relation can be
>> * processed in which case the user will know about it.
>> */
>> - if (!tables_listed)
>> + if (!objects_listed || objfilter == 'n')
>> {
>> appendPQExpBufferStr(&catalog_query, " WHERE c.relkind OPERATOR(pg_catalog.=) ANY (array["
>> CppAsString2(RELKIND_RELATION) ", "
> I think this deserveѕ a comment.
>
Attached v8 of the patch that tries to address the remarks above, fixes
patch apply failure to master and replace calls to pg_log_error+exit
with pg_fatal.
.Thanks.
--
Gilles Darold
Attachment | Content-Type | Size |
---|---|---|
0001-vacuumdb-schema-only-v8.patch | text/x-patch | 15.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Zheng Li | 2022-04-14 20:31:15 | Re: Support logical replication of DDLs |
Previous Message | Tom Lane | 2022-04-14 20:26:00 | Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403) |