pgsql: Fix old bug in log_autovacuum_min_duration code: it was relying - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix old bug in log_autovacuum_min_duration code: it was relying
Date
Msg-id 20090812182356.098E875331E@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        analyze.c (r1.139 -> r1.139.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/analyze.c?r1=1.139&r2=1.139.2.1)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix old bug in log_autovacuum_min_duration code: it was relying
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Allow backends to start up without use of the flat-file copy of