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:
ea23f9f
)
Avoid losing track of data for shared tables in pgstats. Report by Michael
author
Alvaro Herrera
<
[email protected]
>
Thu, 7 Jun 2007 19:07:11 +0000
(19:07 +0000)
committer
Alvaro Herrera
<
[email protected]
>
Thu, 7 Jun 2007 19:07:11 +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 5529f2917bbeff5ff4cb54d76df6521f1cba74aa..edf150b9feeaea86747e9d9057fc299b8d56e539 100644
(file)
--- a/
src/backend/postmaster/pgstat.c
+++ b/
src/backend/postmaster/pgstat.c
@@
-919,7
+919,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);
}