Re: Add SKIP LOCKED to VACUUM and ANALYZE
Nathan Bossart <bossartn@amazon.com>
From: "Bossart, Nathan" <bossartn@amazon.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
"Andres
Freund" <andres@anarazel.de>,
Masahiko Sawada <sawada.mshk@gmail.com>,
Robert
Haas <robertmhaas@gmail.com>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>,
Lyes Ameddah <lyes.amd@gmail.com>
Date: 2018-10-02T02:22:42Z
Lists: pgsql-hackers
Attachments
- vacuum-skip-locked-v10.patch (application/octet-stream) patch v10
On 10/1/18, 7:07 PM, "Michael Paquier" <michael@paquier.xyz> wrote: > On Mon, Oct 01, 2018 at 03:37:01PM +0000, Bossart, Nathan wrote: >> Without the find_all_inheritors() stuff, I think we would just need to >> modify the ANALYZE documentation patch to say something like >> >> Specifies that ANALYZE should not wait for any conflicting locks >> to be released: if a relation cannot be locked immediately without >> waiting, the relation is skipped. Note that even with this >> option, ANALYZE can still block when opening the relation's >> indexes or when acquiring sample rows to prepare the statistics. >> Also, while ANALYZE ordinarily processes all leaf partitions of >> partitioned tables, this option will cause ANALYZE to skip all >> leaf partitions if there is a conflicting lock on the partitioned >> table. > > Yes, I think that we could live with something like that. I could give > this whole thing a shot, but this will have to wait until the commit > fest is closed as there are still many patches to classify. If you can > send a patch that's of course always helpful.. Sure, here it is. Nathan
Commits
-
Add option SKIP_LOCKED to VACUUM and ANALYZE
- 803b1301e8c9 12.0 landed
-
Refactor relation opening for VACUUM and ANALYZE
- e3a25ab9ea56 12.0 landed
-
Refactor cluster_rel() to handle more options
- 9ebe0572ceab 12.0 landed
-
Add assertion in expand_vacuum_rel() for non-autovacuum path
- 6551f3daa256 12.0 landed