Re: Vacuum explained -> Dangerous ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Vacuum explained -> Dangerous ?
Date: 2003-01-07 15:13:59
Message-ID: 13217.1041952439@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Gaetano Mendola" <mendola(at)bigfoot(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-01-07 15:29:16 Re: sanity error with pg_dump on postgresql 7.0.2
Previous Message David F. Skoll 2003-01-07 14:46:18 Weird behaviour on Solaris: recv() returns ENOENT