Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E0F70476A12 for ; Tue, 7 Jan 2003 10:13:56 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 3AD00476A0C for ; Tue, 7 Jan 2003 10:13:56 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h07FDx0U013218; Tue, 7 Jan 2003 10:13:59 -0500 (EST) To: "Gaetano Mendola" Cc: pgsql-admin@postgresql.org Subject: Re: Vacuum explained -> Dangerous ? In-reply-to: References: <26423.1041885959@sss.pgh.pa.us> Comments: In-reply-to "Gaetano Mendola" message dated "Tue, 07 Jan 2003 11:29:44 +0100" Date: Tue, 07 Jan 2003 10:13:59 -0500 Message-ID: <13217.1041952439@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/51 X-Sequence-Number: 6893 "Gaetano Mendola" 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