Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6C82A632690 for ; Sat, 31 Jan 2009 19:47:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81174-04 for ; Sat, 31 Jan 2009 19:47:55 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.236]) by mail.postgresql.org (Postfix) with ESMTP id 7373663264A for ; Sat, 31 Jan 2009 19:47:55 -0400 (AST) Received: by rv-out-0506.google.com with SMTP id b25so1021467rvf.43 for ; Sat, 31 Jan 2009 15:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=0PwGe3UPj3Xfy+v+jVTGRgNbQwMmWS+c0qAw/VoZOHE=; b=Zvd/NZLj8rtJYTqd2pl71s+kwO7LgJ+ctaFns5jVhEHr205Wg9qmyq9UV2CUBdKxiE hAitXGoqJh7fILzhDv9C+ZBfbkfd/hXHLscbZqdOvVUd2WK80DDi84KjzNiNQvR3bFhS iU9hUd4rQjeBhLIozaCAwRU1dUZG4bxn4ZQZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=jE5/KYcVD7keXiZuLTOd9/Xi1R+k8v5oEFga6wBxQOOORLGUNM+XDgXzQtp+5m77rW 07NrxtaVXpcvIk2S7g8GIOds8H5zGcu48D9/Sg6aO1XUf1ZPjje1RTizaipo/qXEzHuE 3CfmAd9nSIdxW1z9UviePs09wtneBsN/BtouY= MIME-Version: 1.0 Received: by 10.142.125.9 with SMTP id x9mr1137266wfc.331.1233445674028; Sat, 31 Jan 2009 15:47:54 -0800 (PST) In-Reply-To: <200901301223.49703@zmi.at> References: <75E4C42D37E6A74E9FB57C2E9F1300D60107073E@tiger.nexperience.com> <200901292014.29195@zmi.at> <14708.1233277601@sss.pgh.pa.us> <200901301223.49703@zmi.at> Date: Sun, 1 Feb 2009 12:47:53 +1300 Message-ID: <9adabaf40901311547r1444e0c4m4797da5b30671d63@mail.gmail.com> Subject: Re: [GENERAL] Encoding problem using pg_dumpall From: Cliff Pratt To: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200901/173 X-Sequence-Number: 31220 On Sat, Jan 31, 2009 at 12:23 AM, Michael Monnerie wrote: > On Freitag 30 Januar 2009 Tom Lane wrote: >> The -Fc (and -Ft) formats are only designed to hold the contents of a >> single database; and pg_restore only knows how to restore into a >> single database. >> >> If you feel like fixing that, step right up. > > Sorry, didn't want to step on toes here. I know that sometimes if you > perfectly know a system you get blind over alternatives, and wanted to > throw in an idea. > > The format of pg_dumpall could be a tar of single pg_dumps as well, > making pg_dumpall just call pg_dump for each db, putting that output > into the tar output from pg_dumpall. But again, just an idea, I don't > mind really. I'm just a sysadmin who wants things as easy as possible. > Maybe fixing pg_dumpall to include that -E is easier. > You should be able to knock up a simple script in bash, perl or python to do what you want. Sort of like: Use 'psql' to get a list of the databases Sanitize the list. Loop through the list doing backup. At the end zip them all. With a little bit of trickery you should be able to zip them as you go. With regards being too close to the system, while this is true, it also possible to be distant from the system's entrails and not don't realize the implications and difficulties of your brilliant idea for enhancement! Cheers, Cliff