Re: BUG #14941: Vacuum crashes
Nathan Bossart <bossartn@amazon.com>
From: "Bossart, Nathan" <bossartn@amazon.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Michael Paquier <michael.paquier@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: 2017-12-18T22:18:09Z
Lists: pgsql-bugs, pgsql-hackers
On 12/18/17, 3:30 PM, "Masahiko Sawada" <sawada.mshk@gmail.com> wrote: > According to the following old comment, there might be reason why we > didn't pass the information to vacuum_rel(). But your patch fetches > the relation > name even if the "relation" is not provided. I wonder if it can be > problem in some cases. Thanks for taking another look. I've thought through a few edge cases here, but I haven't noticed anything that I think is a problem. If an unspecified relation is renamed prior to get_rel_name(), we'll use the updated name, which doesn't seem like an issue. If an unspecified relation is renamed between get_rel_name() and the log statement, we'll use the old name, which seems possible in the current logging logic for VACUUM/ANALYZE. And if an unspecified relation is dropped just prior to get_rel_name(), the result will be NULL, and the logging will be skipped (as it already is for concurrently dropped relations that are not specified in the command). 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