Re: Vacuum explained -> Dangerous ? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Vacuum explained -> Dangerous ?
Date
Msg-id 13217.1041952439@sss.pgh.pa.us
Whole thread Raw
In response to Re: Vacuum explained -> Dangerous ?  ("Gaetano Mendola" <mendola@bigfoot.com>)
List pgsql-admin
"Gaetano Mendola" <mendola@bigfoot.com> writes:
> This mean that if a process do a "begin transaction" and stay there one
> month without
> activity all row delete or updated after that "begin transaction" remain
> there for ever ?

Actually not, because the transaction does not start internally
(MyProc->xmin doesn't get set) until its first real statement begins.
However, if you do something like
    begin;
    select 2+2;
and *then* go to sleep for a long time, then yes you will block vacuum
from reclaiming space.

Also, I believe the value of now() is frozen when you say "begin",
so I'd still say it's not good practice to "begin" until you're ready to
actually do something ...

            regards, tom lane

pgsql-admin by date:

Previous
From: "David F. Skoll"
Date:
Subject: Weird behaviour on Solaris: recv() returns ENOENT
Next
From: Tom Lane
Date:
Subject: Re: sanity error with pg_dump on postgresql 7.0.2