X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5C236D1B521 for ; Tue, 11 Nov 2003 17:37:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 88600-03 for ; Tue, 11 Nov 2003 13:37:07 -0400 (AST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 6F3D8D1B508 for ; Tue, 11 Nov 2003 13:37:06 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 098673506C; Tue, 11 Nov 2003 09:36:51 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 07F4034D5B; Tue, 11 Nov 2003 09:36:51 -0800 (PST) Date: Tue, 11 Nov 2003 09:36:50 -0800 (PST) From: Stephan Szabo To: pginfo Cc: Antonis Antoniou , "'pgsql-admin@postgresql.org'" Subject: Re: vacuum full problem In-Reply-To: <3FB107F9.22761F7A@t1.unisoftbg.com> Message-ID: <20031111093415.C65271@megazone.bigpanda.com> References: <3FAB2AFA.E32E7FD6@t1.unisoftbg.com> <3FAB78F3.8060406@albourne.com> <3FABBEAB.D15DBA8@t1.unisoftbg.com> <3FB08DF3.5080703@albourne.com> <20031111000039.L47755@megazone.bigpanda.com> <3FB09C68.2003C6F9@t1.unisoftbg.com> <20031111070303.K60760@megazone.bigpanda.com> <3FB107F9.22761F7A@t1.unisoftbg.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/184 X-Sequence-Number: 11171 On Tue, 11 Nov 2003, pginfo wrote: > The result by is: > acc01=# select * from pg_locks; > relation | database | transaction | pid | mode | granted > ----------+----------+-------------+-------+-----------------+--------- > 16757 | 16976 | | 23169 | AccessShareLock | t > 17062 | 16976 | | 1372 | AccessShareLock | t > 17060 | 16976 | | 1372 | AccessShareLock | t > | | 116303 | 1372 | ExclusiveLock | t > | | 166846 | 23169 | ExclusiveLock | t > 16995 | 16976 | | 1372 | AccessShareLock | t > 17056 | 16976 | | 1372 | AccessShareLock | t > 17038 | 16976 | | 1372 | AccessShareLock | t > (8 rows) Is that while the vacuum is running or just a general state that you might run the vacuum in? > And only transaction 116303 is the problem. > Also it is production system with many transaction/sec and I am looking dor a > way to detect what query is in this transaction ( if possible). > The system is relativ big and it is dificult to detect this problem only from > transacton number, but we will read the code to find the bug. Well, you can turn on the statement statistics stuff and/or the statement logging stuff to help you find what the various transactions are doing. I'd wonder if you're maybe not closing a transaction after it's completed its work though and so the locks are sitting around.