From 1bab464eb40ceb96a9dedbf11393b7b51c55ec0a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 31 Aug 2002 17:14:28 +0000 Subject: Code review for pg_locks feature. Make shmemoffset of PROCLOCK structs available (else there's no way to interpret the list links). Change pg_locks view to show transaction ID locks separately from ordinary relation locks. Avoid showing N duplicate rows when the same lock is held multiple times (seems unlikely that users care about exact hold count). Improve documentation. --- src/bin/initdb/initdb.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/bin/initdb') diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh index 33264050c8e..7441105e000 100644 --- a/src/bin/initdb/initdb.sh +++ b/src/bin/initdb/initdb.sh @@ -27,7 +27,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.169 2002/08/27 04:00:28 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.170 2002/08/31 17:14:28 tgl Exp $ # #------------------------------------------------------------------------- @@ -978,15 +978,12 @@ CREATE VIEW pg_stat_database AS \ FROM pg_database D; CREATE VIEW pg_locks AS \ - SELECT \ - L.relation, L.database, L.backendpid, L.mode, L.isgranted \ - FROM pg_lock_status() AS L(relation oid, database oid, \ - backendpid int4, mode text, isgranted boolean); + SELECT * \ + FROM pg_lock_status() AS L(relation oid, database oid, \ + transaction xid, pid int4, mode text, granted boolean); CREATE VIEW pg_settings AS \ - SELECT \ - A.name, \ - A.setting \ + SELECT * \ FROM pg_show_all_settings() AS A(name text, setting text); CREATE RULE pg_settings_u AS \ -- cgit v1.2.3