pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: pginfo <pginfo@t1.unisoftbg.com>
Cc: Antonis Antoniou <a.antoniou@albourne.com>
Cc: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: Re: vacuum full problem
Date: Tue, 11 Nov 2003 09:51:31 -0800 (PST)
Message-ID: <20031111094948.M65865@megazone.bigpanda.com> (raw)
In-Reply-To: <3FB1102C.EC021E32@t1.unisoftbg.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>
	<20031111093415.C65271@megazone.bigpanda.com>
	<3FB1102C.EC021E32@t1.unisoftbg.com>

On Tue, 11 Nov 2003, pginfo wrote:

> Stephan Szabo wrote:
>
> > 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?
> >
>
> It looks as general state.
>
> > > 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.
>
> I will do it.
> It is possible to be one not closed transaction, but in this case nobody will be
> able to modify this table (tables) and
> the system will stop to respond. The paradox is that the system works well without

Not necessarily. People are going to be able to insert/update/delete from
the tables (the locks are AccessShareLock) because those don't get a
conflicting table lock.  They're not going to be able to do things like
vacuum full or alter table however because those do.

> How big is the penalty for statistic on?

I'm not sure, but you can turn it on until you find it and then turn it
off again.



view thread (15+ messages)  latest in thread

Message-ID: <20031111094948.M65865@megazone.bigpanda.com>
Permalink:  ../20031111094948.M65865@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20031111094948.M65865@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, pginfo@t1.unisoftbg.com, a.antoniou@albourne.com
  Subject: Re: vacuum full problem
  In-Reply-To: <20031111094948.M65865@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> <20031111093415.C65271@megazone.bigpanda.com> <3FB1102C.EC021E32@t1.unisoftbg.com> <20031111094948.M65865@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox