aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-06-21 22:32:30 -0400
committerRobert Haas <rhaas@postgresql.org>2011-06-21 22:36:59 -0400
commit7095003cbef630fe29c2299cc819fd37c691d0b0 (patch)
treea248a40965cb734062621bc037e941429c74bc88 /src
parent8f9fe6edce358f7904e0db119416b4d1080a83aa (diff)
downloadpostgresql-7095003cbef630fe29c2299cc819fd37c691d0b0.tar.gz
postgresql-7095003cbef630fe29c2299cc819fd37c691d0b0.zip
Make deadlock_timeout PGC_SUSET rather than PGC_SIGHUP.
This allows deadlock_timeout to be reduced for transactions that are particularly likely to be involved in a deadlock, thus detecting it more quickly. It is also potentially useful as a poor-man's deadlock priority mechanism: a transaction with a high deadlock_timeout is less likely to be chosen as the victim than one with a low deadlock_timeout. Since that could be used to game the system, we make this PGC_SUSET rather than PGC_USERSET. At some point, it might be worth thinking about a more explicit priority mechanism, since using this is far from fool-proof. But let's see whether there's enough use case to justify the additional work before we go down that route. Noah Misch, reviewed by Shigeru Hanada
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/misc/guc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 1c6f1977483..6e85cb53357 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1532,8 +1532,8 @@ static struct config_int ConfigureNamesInt[] =
},
{
- /* This is PGC_SIGHUP so all backends have the same value. */
- {"deadlock_timeout", PGC_SIGHUP, LOCK_MANAGEMENT,
+ /* This is PGC_SUSET to prevent hiding from log_lock_waits. */
+ {"deadlock_timeout", PGC_SUSET, LOCK_MANAGEMENT,
gettext_noop("Sets the time to wait on a lock before checking for deadlock."),
NULL,
GUC_UNIT_MS