Skip to content

Commit e4b9e65

Browse files
committed
Fix pg_stat_statements for EXEC_BACKEND case.
We should not try to load old statistics when re-attaching to existing shared memory. Per bug #4941. Itagaki Takahiro
1 parent 8835d63 commit e4b9e65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Copyright (c) 2008-2009, PostgreSQL Global Development Group
1515
*
1616
* IDENTIFICATION
17-
* $PostgreSQL: pgsql/contrib/pg_stat_statements/pg_stat_statements.c,v 1.3 2009/06/11 14:48:51 momjian Exp $
17+
* $PostgreSQL: pgsql/contrib/pg_stat_statements/pg_stat_statements.c,v 1.4 2009/07/27 03:34:40 tgl Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -332,7 +332,7 @@ pgss_shmem_startup(void)
332332
* Note: we don't bother with locks here, because there should be no other
333333
* processes running when this is called.
334334
*/
335-
if (!pgss_save)
335+
if (found || !pgss_save)
336336
return;
337337

338338
file = AllocateFile(PGSS_DUMP_FILE, PG_BINARY_R);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy