Re: BUG #14941: Vacuum crashes
Nathan Bossart <bossartn@amazon.com>
From: "Bossart, Nathan" <bossartn@amazon.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
Robert Haas <robertmhaas@gmail.com>,
Lyes Ameddah <lyes.amd@gmail.com>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
"pgsql-bugs@postgresql.org" <pgsql-bugs@postgresql.org>
Date: 2018-01-10T17:26:43Z
Lists: pgsql-bugs, pgsql-hackers
Attachments
- 0003_add_nowait_vacuum_option_v4.patch (application/octet-stream) patch v4
- 0002_add_parenthesized_analyzed_syntax_v2.patch (application/octet-stream) patch v2
On 1/9/18, 8:54 PM, "Michael Paquier" <michael.paquier@gmail.com> wrote: > Backpedalling a bit on this point and coming back to this message from > Tom (https://www.postgresql.org/message-id/28748.1507071576%40sss.pgh.pa.us) > which you just cited. Why do we actually need to issue any WARNING > messages for unlisted relations? Contrary to what Sawada-san complained > upthread, it looks sane to me to not log anything if a relation is not > explicitely listed. So you should not get any warnings for a > database-wide VACUUM if a relation is dropped while the thing is > running, and what you proposed initially in > https://www.postgresql.org/message-id/D3FC73E2-9B1A-4DB4-8180-55F57D116B4E@amazon.com > is more simple, does not need to worry about any kind of timing issues, > and is consistent with autovacuum. Right. I don't have a terribly strong opinion either way. I think the counter-argument is that logging skipped relations might provide valuable feedback to users. If I ran a database-wide VACUUM and a relation was skipped due to lock contention, it might be nice to know that so I can handle the relation individually. Perhaps any logging changes for VACOPT_NOWAIT could be handled in a separate thread. For now, I've updated 0003 to remove the logging changes. Nathan
Commits
-
Add option SKIP_LOCKED to VACUUM and ANALYZE
- 803b1301e8c9 12.0 landed
-
Rename VACOPT_NOWAIT to VACOPT_SKIP_LOCKED
- edc6b41bd4a8 12.0 landed
-
Add parenthesized options syntax for ANALYZE.
- 854dd8cff523 11.0 landed
-
Don't allow VACUUM VERBOSE ANALYZE VERBOSE.
- 921059bd66c7 11.0 landed
-
Fix inadequate locking during get_rel_oids().
- 19de0ab23ccb 11.0 cited
-
Avoid having autovacuum workers wait for relation locks.
- 32896c40ca76 9.1.0 cited