OSDN Git Service

Fix old bug in log_autovacuum_min_duration code: it was relying on being able
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 12 Aug 2009 18:23:49 +0000 (18:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 12 Aug 2009 18:23:49 +0000 (18:23 +0000)
commita1f0c9bab99edc6029dee3bf702348aa7eab0099
treea002907b1841f3daddf2c296b967a16ec5f3f162
parent9d9848668fd868a4e51f3a3f22c2807ff0e46582
Fix old bug in log_autovacuum_min_duration code: it was relying on being able
to access a Relation entry it had just closed.  I happened to be testing with
CLOBBER_CACHE_ALWAYS, which made this a guaranteed core dump (at least on
machines where sprintf %s isn't forgiving of a NULL pointer).  It's probably
quite unlikely that it would fail in the field, but a bug is a bug.  Fix by
moving the relation_close call down past the logging action.
src/backend/commands/analyze.c