Re: [Proposal] Allow users to specify multiple tables in VACUUM commands
Nathan Bossart <bossartn@amazon.com>
From: "Bossart, Nathan" <bossartn@amazon.com>
To: Michael Paquier <michael.paquier@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
"Masahiko
Sawada" <sawada.mshk@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Robert Haas <robertmhaas@gmail.com>
Date: 2017-09-21T16:59:14Z
Lists: pgsql-hackers
Attachments
- 0002-vacuum_multiple_tables_v19.patch (application/octet-stream) patch v19-0002
- 0001-error_on_duplicate_columns_in_analyze_v6.patch (application/octet-stream) patch v6-0001
On 9/20/17, 7:58 PM, "Michael Paquier" <michael.paquier@gmail.com> wrote: > On Thu, Sep 21, 2017 at 9:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Michael Paquier <michael.paquier@gmail.com> writes: >>> On Thu, Sep 21, 2017 at 9:08 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>>> Um ... so? With Nathan's proposed behavior, there are two cases depending >>>> on just when the unexpected schema change happens: >>>> 1. *None* of the work gets done. >>>> 2. The work before the troublesome relation gets done, and the work after >>>> doesn't. >> >>> You may be missing one which is closer to what autovacuum does: >>> 3) Issue a warning for the troublesome relation, and get the work done >>> a maximum. >> >> Well, we could certainly discuss whether the behavior on detecting a >> conflict ought to be "error" or "warning and continue". But I do not buy >> the value of "it might be one or the other depending on timing". > > I definitely agree with that, and I don't want this point to be a > blocker for the proposed patch either. So if you feel that for now the > focus should be on simplicity rather than reliability (my word may be > incorrect here, I mean having a consistent and continuous flow), let's > do so then. We could always change the implemented behavior later on. Alright, here is something that I think is more like what Tom envisioned. The duplicate column checks have been moved to do_analyze_rel(), and I am hoping that it is more feasible to back-patch. The main path now processes each specified relation individually, which admittedly makes the patch a bit simpler. Nathan
Commits
-
Allow multiple tables to be specified in one VACUUM or ANALYZE command.
- 11d8d72c27a6 11.0 landed
-
Give a better error for duplicate entries in VACUUM/ANALYZE column list.
- ea31541f5648 9.6.6 landed
- e56facd8b300 9.2.24 landed
- b572b435ca67 9.4.15 landed
- a2b1eb23496e 10.0 landed
- a09d8be7ddaf 9.3.20 landed
- 71480501057f 11.0 landed
- 122289a66b92 9.5.10 landed
-
Reject ANALYZE commands during VACUUM FULL or another ANALYZE.
- e415b469b33b 9.5.0 cited