projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf0529c
)
Avoid losing track of data for shared tables in pgstats. Report by Michael
author
Alvaro Herrera
<
[email protected]
>
Thu, 7 Jun 2007 19:07:13 +0000
(19:07 +0000)
committer
Alvaro Herrera
<
[email protected]
>
Thu, 7 Jun 2007 19:07:13 +0000
(19:07 +0000)
Fuhr, patch from Tom Lane after a messier suggestion by me.
src/backend/postmaster/pgstat.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/postmaster/pgstat.c
b/src/backend/postmaster/pgstat.c
index 019ede4b2dee83777ab6fa3e33caee3864df5a53..ffeb9b584c6b8e65f067b0f7e4c9cc6feacdbcde 100644
(file)
--- a/
src/backend/postmaster/pgstat.c
+++ b/
src/backend/postmaster/pgstat.c
@@
-690,7
+690,9
@@
pgstat_vacuum_tabstat(void)
CHECK_FOR_INTERRUPTS();
- if (hash_search(htab, (void *) &dbid, HASH_FIND, NULL) == NULL)
+ /* the DB entry for shared tables (with InvalidOid) is never dropped */
+ if (OidIsValid(dbid) &&
+ hash_search(htab, (void *) &dbid, HASH_FIND, NULL) == NULL)
pgstat_drop_database(dbid);
}