X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3BF1BD1B54D for ; Tue, 7 Oct 2003 04:20:32 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 28623-03 for ; Tue, 7 Oct 2003 01:19:42 -0300 (ADT) Received: from sj-iport-1.cisco.com (sj-iport-1-in.cisco.com [171.71.176.70]) by svr1.postgresql.org (Postfix) with ESMTP id ACB59D1B55C for ; Tue, 7 Oct 2003 01:19:40 -0300 (ADT) Received: from cjwhitew2k01 (tokyo-vpn-user263.cisco.com [10.70.83.7]) by bej-core-1.cisco.com (8.12.9/8.12.6) with ESMTP id h974IvWr000346; Tue, 7 Oct 2003 12:18:59 +0800 (CST) Reply-To: From: "Chris White (cjwhite)" To: "'Tom Lane'" Cc: "'Robert Treat'" , Subject: Re: Question about DB VACUUM Date: Mon, 6 Oct 2003 21:20:43 -0700 Message-ID: <000401c38c8a$6270f010$0400a8c0@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 In-Reply-To: <20438.1065499687@sss.pgh.pa.us> Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/71 X-Sequence-Number: 10632 Okay now I understand what is going on. I have a second thread which is being used to read these objects out of the database to present to the user, and because large objects can only be accessed in a transaction mode I have not closed the transaction on this thread. Should I do a commit or rollback to terminate the transaction, once I have closed the large object, even though I have not done any modifications to the large objects? Chris -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Monday, October 06, 2003 9:08 PM To: cjwhite@cisco.com Cc: 'Robert Treat'; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Question about DB VACUUM "Chris White \(cjwhite\)" writes: > But as you could see from the prior query \lo_list showed no large > objects, this was done just prior to the vacuum. > aesop=# \lo_list > Large objects > ID | Description > ----+------------- > (0 rows) > aesop=# vacuum verbose pg_largeobject; > NOTICE: --Relation pg_largeobject-- > NOTICE: Index pg_largeobject_loid_pn_index: Pages 2819; Tuples 460: > Deleted 84. This would seem to indicate that you have open transactions hanging around somewhere in the background. VACUUM can't delete tuples that might still be visible under MVCC rules to some open transaction. regards, tom lane