From: | Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info> |
---|---|
To: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | Lutz Steinborn <l(dot)steinborn(at)4c-ag(dot)de>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: nonremovable row versions |
Date: | 2009-06-08 14:06:46 |
Message-ID: | 1244470006.29189.39.camel@bnicholson-desktop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Mon, 2009-06-08 at 01:14 -0600, Scott Marlowe wrote:
> On Mon, Jun 8, 2009 at 12:28 AM, Lutz Steinborn<l(dot)steinborn(at)4c-ag(dot)de> wrote:
> > Hi,
> >
> > can anybody tell me how to get rid of nonremovable row versions ?
> > I know what those rows coming from long running transactions. But I can't see
> > any long running transactions in pg_locks and all postgres processes are idle.
> > How else can I check if transaction in process ?
> >
> >
> > I don't have any idea from where those long running transaction are comming
> > because we are stopping/starting our apllications every 2-3 days. And its not
> > the nature of our applications to establish long running transactions.
>
> I think you misunderstand nonremoveable rows. A demonstration:
>
> postgres=# create table test (id int);
> CREATE TABLE
> postgres=# insert into test values (1),(2),(3);
> INSERT 0 3
> postgres=# vacuum verbose test;
> INFO: vacuuming "public.test"
> INFO: "test": found 0 removable, 3 nonremovable row versions in 1 pages
> DETAIL: 0 dead row versions cannot be removed yet.
> There were 0 unused item pointers.
> 1 pages contain useful free space.
> 0 pages are entirely empty.
> CPU 0.00s/0.00u sec elapsed 0.00 sec.
> VACUUM
>
> It's not just old transactions, it's current data as well.
I've seen cases in 8.1 where the information pg_stat_activity is
incorrectly report a transaction as "<IDLE>" when it is in fact blocking
the removal of dead tuples.
I always chalked it up to inaccuracy of the stats collector in 8.1.
--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.
From | Date | Subject | |
---|---|---|---|
Next Message | Roland Hughes | 2009-06-08 17:23:06 | Add pre-existing tablespace to new installation |
Previous Message | Michael Monnerie | 2009-06-08 07:46:54 | Re: Who knows this SELECT in PostgreSQL |