X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0F8BE9FA5DD for ; Fri, 9 Jun 2006 13:43:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 61101-03 for ; Fri, 9 Jun 2006 13:43:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CEAB79FA1A8 for ; Fri, 9 Jun 2006 13:43:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k59Gh2RG012966; Fri, 9 Jun 2006 12:43:02 -0400 (EDT) To: Jeff Frost cc: pgsql-admin@postgresql.org Subject: Re: pg_dumpall 8.1.4 large objects error In-reply-to: References: <25292.1149650216@sss.pgh.pa.us> Comments: In-reply-to Jeff Frost message dated "Fri, 09 Jun 2006 09:21:12 -0700" Date: Fri, 09 Jun 2006 12:43:02 -0400 Message-ID: <12965.1149871382@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/80 X-Sequence-Number: 22042 Jeff Frost writes: >> On Tue, 6 Jun 2006, Tom Lane wrote: >>> I'd try a REINDEX of pg_largeobject to see if that fixes it. > Got the REINDEX completed and found a new error that I haven't seen before: > pg_dump: SQL command failed > pg_dump: Error message from server: ERROR: Memory exhausted in AllocSetAlloc(96) Hm, I'm not sure why it did that. Possibly an ANALYZE on pg_largeobject would change the plan for the SELECT DISTINCT and get you out of trouble. > Would it be better and more efficient to just pg_dumpall the globals and > pg_dump in custom format the vsl_cs db? Won't help AFAIK --- that query will be used for blob dumping in all cases. Or actually, according to the cursor name, this is the query for dumping blob comments. > Server is 7.3.2, and the plan is to upgrade it. Might be worth your while to update the server to 7.3.latest in-place. The list of bugs fixed in 7.3.x is very long; I'm too lazy to look and see if any of them look related to this, but it's possible. Also, if you don't mind altering pg_dump, it looks to me like the query being used here is unnecessarily inefficient: /* Cursor to get all BLOB comments */ if (AH->remoteVersion >= 70200) blobQry = "DECLARE blobcmt CURSOR FOR SELECT DISTINCT loid, obj_description(loid, 'pg_largeobject') FROM pg_largeobject"; This is computing obj_description() redundantly for each pg_largeobject chunk. Perhaps there is a memory leak in obj_description() in 7.3.2? If so it'd help to use DECLARE blobcmt CURSOR FOR SELECT loid, obj_description(loid,'pg_largeobject') FROM (SELECT DISTINCT loid FROM pg_largeobject) ss; (Think I'll go change this in CVS, too, as it's obviously tremendously inefficient if you've got big large objects...) regards, tom lane