1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Fix pg_locks view to call advisory locks advisory locks, while preserving

backward compatibility for anyone using the old userlock code that's now
on pgfoundry --- locks from that code still show as 'userlock'.
This commit is contained in:
Tom Lane
2006-09-22 23:20:14 +00:00
parent beca984e5f
commit d40d34863e
5 changed files with 33 additions and 19 deletions

View File

@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.42 2006/09/18 22:40:36 tgl Exp $
* $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.43 2006/09/22 23:20:13 tgl Exp $
*
* Interface:
*
@@ -872,8 +872,16 @@ DescribeLockTag(StringInfo buf, const LOCKTAG *lock)
lock->locktag_field1);
break;
case LOCKTAG_USERLOCK:
/* reserved for old contrib code, now on pgfoundry */
appendStringInfo(buf,
_("user lock [%u,%u,%u,%u]"),
_("user lock [%u,%u,%u]"),
lock->locktag_field1,
lock->locktag_field2,
lock->locktag_field3);
break;
case LOCKTAG_ADVISORY:
appendStringInfo(buf,
_("advisory lock [%u,%u,%u,%u]"),
lock->locktag_field1,
lock->locktag_field2,
lock->locktag_field3,