Re: [Proposal] Allow users to specify multiple tables in VACUUM commands

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [Proposal] Allow users to specify multiple tables in VACUUM commands
Date: 2017-08-31 15:25:58
Message-ID: 7C842F40-26DD-4B63-B850-4C9EDABF8343@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/31/17, 2:24 AM, "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com> wrote:
> I reviewed these patches and found a issue.

Thanks for reviewing.

> autovacuum worker seems not to work fine. I got an error message;
>
> ERROR: unrecognized node type: 0
> CONTEXT: automatic analyze of table "postgres.public.hoge"
>
> I think we should set T_RangeVar to rangevar.type in
> autovacuum_do_vac_analyze function.

Yes, it looks like the NodeTag is not getting set on the RangeVar.
I went ahead and switched this to makeRangeVar(...) instead of
keeping it manually allocated on the stack. Autovacuum seems to be
working as usual now.

> Also, there is a small typo in dedupe_vacuum_relations_v2.patch.
>
> + /* if already procesed or not equal, skip */
> + if (list_member_int(duplicates, i) ||
> relation->oid != nth_rel->oid)
> + continue;
>
> s/procesed/processed/g

This should be fixed in v3.

Nathan

Attachment Content-Type Size
vacuum_multiple_tables_v12.patch application/octet-stream 31.7 KB
dedupe_vacuum_relations_v3.patch application/octet-stream 4.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2017-08-31 16:22:59 Re: REINDEX CONCURRENTLY 2.0
Previous Message Tom Lane 2017-08-31 15:09:37 Assorted leaks and weirdness in parallel execution