diff options
| author | Simon Riggs <simon@2ndQuadrant.com> | 2010-04-22 08:04:25 +0000 |
|---|---|---|
| committer | Simon Riggs <simon@2ndQuadrant.com> | 2010-04-22 08:04:25 +0000 |
| commit | a2555571fb8e370972763d5d5092a0a4e4e6a30b (patch) | |
| tree | c81faffdc6bfbf57a79f7de6cb07f2116e3f6d19 /src/backend/storage | |
| parent | 781ec6b75d6f4e89f103f44a31465383ac13c917 (diff) | |
| download | postgresql-a2555571fb8e370972763d5d5092a0a4e4e6a30b.tar.gz | |
Optimise btree delete processing when no active backends.
Clarify comments, downgrade a message to DEBUG and remove some
debug counters. Direct from ideas by Heikki Linnakangas.
Diffstat (limited to 'src/backend/storage')
| -rw-r--r-- | src/backend/storage/ipc/procarray.c | 5 | ||||
| -rw-r--r-- | src/backend/storage/ipc/standby.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 9aef06fca7..2dde056a97 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.65 2010/04/21 19:08:14 sriggs Exp $ + * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.66 2010/04/22 08:04:25 sriggs Exp $ * *------------------------------------------------------------------------- */ @@ -1839,7 +1839,8 @@ CountDBBackends(Oid databaseid) if (proc->pid == 0) continue; /* do not count prepared xacts */ - if (proc->databaseId == databaseid) + if (!OidIsValid(databaseid) || + proc->databaseId == databaseid) count++; } diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 4d3cecb455..029d807079 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -11,7 +11,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.17 2010/04/21 19:08:14 sriggs Exp $ + * $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.18 2010/04/22 08:04:25 sriggs Exp $ * *------------------------------------------------------------------------- */ @@ -248,7 +248,7 @@ ResolveRecoveryConflictWithSnapshot(TransactionId latestRemovedXid, RelFileNode /* * If we get passed InvalidTransactionId then we are a little surprised, - * but it is theoretically possible, so spit out a LOG message, but not + * but it is theoretically possible, so spit out a DEBUG1 message, but not * one that needs translating. * * We grab latestCompletedXid instead because this is the very latest @@ -256,7 +256,7 @@ ResolveRecoveryConflictWithSnapshot(TransactionId latestRemovedXid, RelFileNode */ if (!TransactionIdIsValid(latestRemovedXid)) { - elog(LOG, "Invalid latestRemovedXid reported, using latestCompletedXid instead"); + elog(DEBUG1, "Invalid latestremovexXid reported, using latestcompletedxid instead"); LWLockAcquire(ProcArrayLock, LW_SHARED); latestRemovedXid = ShmemVariableCache->latestCompletedXid; |
