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-28T22:46:18Z
Lists: pgsql-bugs, pgsql-hackers
Attachments
- 0003_add_nowait_vacuum_option_v3.patch (application/octet-stream) patch v3
- 0001_fix_unparenthesized_vacuum_grammar_v2.patch (application/octet-stream) patch v2
- 0002_add_parenthesized_analyzed_syntax_v2.patch (application/octet-stream) patch v2
On 12/21/17, 11:07 PM, "Masahiko Sawada" <sawada.mshk@gmail.com> wrote: > On the latest patch, it looks good to me except for a following comment. > > - * If the RangeVar is not defined, we do not have > enough information > - * to provide a meaningful log statement. Chances are that > - * vacuum_rel's caller has intentionally not provided > this information > - * so that this logging is skipped, anyway. > + * If relname is NULL, we do not have enough > information to provide a > + * meaningful log statement. Chances are that this > information was > + * intentionally not provided so that this logging is > skipped, anyway. > > This comment looks odd to me because we ourselves didn't set relname > just before. For example, we can move the sentence to above comment > block as follows. Thoughts? > > /* > * If relation is NULL, we do not have enough information to provide a > * meaningful log statement. Chances are that this information was > * intentionally not provided so that this logging is skipped, anyway. > * However, iff VACOPT_NOWAIT is specified, we always try to emit > * a log statement even if relation is NULL. > */ > > (snip) > > /* > * Determine the log level. > * > * For autovacuum logs, we emit a LOG if > * log_autovacuum_min_duration is not diabled. For manual VACUUM, we > * emit a WARNING to match the log statements in the permission > * checks. > */ I agree, this makes more sense. I've made this change in v3 of 0003. 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