Fix pg_stat_statements for EXEC_BACKEND case.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Jul 2009 03:34:40 +0000 (03:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Jul 2009 03:34:40 +0000 (03:34 +0000)
We should not try to load old statistics when re-attaching to existing
shared memory.  Per bug #4941.

Itagaki Takahiro

contrib/pg_stat_statements/pg_stat_statements.c

index d61d91ae738d8d29e8189d1c3075a2afc46fcc9e..31d18403642ebd31c5a05048060db7e2240fb133 100644 (file)
@@ -332,7 +332,7 @@ pgss_shmem_startup(void)
         * Note: we don't bother with locks here, because there should be no other
         * processes running when this is called.
         */
-       if (!pgss_save)
+       if (found || !pgss_save)
                return;
 
        file = AllocateFile(PGSS_DUMP_FILE, PG_BINARY_R);