pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Vacuum explained -> Dangerous ?
2+ messages / 2 participants
[nested] [flat]

* Re: Vacuum explained -> Dangerous ?
@ 2003-01-07 10:29  Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Gaetano Mendola @ 2003-01-07 10:29 UTC (permalink / raw)
  To: pgsql-admin

"Tom Lane" <tgl@sss.pgh.pa.us> wrote in message
news:26423.1041885959@sss.pgh.pa.us...
> Robert Treat <xzilla@users.sourceforge.net> writes:
> > Tup = # of "rows" in your table
>
> Right.  This is the number of rows remaining after the vacuum, to be
> precise.
>
> > Keep = # of tuples that the db did not feel it could safely mark/remove
> > (probably envolved in some type of transaction)


NOTICE:  Pages 2518: Changed 38, Empty 0; Tup 75489: Vac 447, Keep 68661,
UnUsed 144574.

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 ?
If it's so, this is what is happening on my DB I have a pool of process (
for performance
sake) and some of this process are not working but the first thing done is:

SetAutoCommit( false );

if this start the transaction ( I'm going to investigate ) is a disaster!!!!

Some one have already experience on that ?


Ciao
Gaetano.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Vacuum explained -> Dangerous ?
@ 2003-01-07 15:13  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2003-01-07 15:13 UTC (permalink / raw)
  To: Gaetano Mendola <mendola@bigfoot.com>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-01-07 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-01-07 10:29 Re: Vacuum explained -> Dangerous ? Gaetano Mendola <mendola@bigfoot.com>
2003-01-07 15:13 ` Tom Lane <tgl@sss.pgh.pa.us>

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