pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simone Tellini <tellini@areabusiness.it>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dumpall and pg_dumps
Date: Thu, 21 Feb 2002 13:44:03 -0500
Message-ID: <8805.1014317043@sss.pgh.pa.us> (raw)
In-Reply-To: <20020221190831.71BB.TELLINI@areabusiness.it>
References: <66d229f1.0202210729.1414c5cc@posting.google.com>
	<8541.1014314039@sss.pgh.pa.us>
	<20020221190831.71BB.TELLINI@areabusiness.it>

Simone Tellini <tellini@areabusiness.it> writes:
> while you're at it, there are 2 other problems I've always experienced
> with pg_dump/pg_dumpall:

>  1. it fails to restore databases owned by users who aren't allowed to
>     create databases: the dump contains a "CREATE USER x NOCREATEDB"
>     line at the top, then tries to \connect x and CREATE DATABASE y,
>     which obviously fails.

There is a plan to fix this, I believe.  Someone's working on an OWNER
clause for CREATE DATABASE; once that exists, we'll make pg_dumpall
issue all the CREATE DATABASE commands as superuser.

>  2. you can't specify username and password on the command line: this
>     makes it impossible to backup automatically all the databases from a
>     cron script if you use password authentication, for instance.

I see no good way around that, except to not use password
authentication.  (Even if it worked, it'd be a bad idea to embed the
password in the backup script.)

This is more practical than it used to be given the availability of
ident-style auth for Unix-socket connections (on many platforms) in 7.2.
Even if you don't have a platform with support for it, ident auth on
localhost TCP connections isn't an unreasonable way to go.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <8805.1014317043@sss.pgh.pa.us>
Permalink:  ../8805.1014317043@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8805.1014317043@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tellini@areabusiness.it
  Subject: Re: pg_dumpall and pg_dumps
  In-Reply-To: <8805.1014317043@sss.pgh.pa.us>
  References: <66d229f1.0202210729.1414c5cc@posting.google.com> <8541.1014314039@sss.pgh.pa.us> <20020221190831.71BB.TELLINI@areabusiness.it> <8805.1014317043@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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