From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Goodenough <david(dot)goodenough(at)btconnect(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dumpall -g problem |
Date: | 2003-04-30 14:30:14 |
Message-ID: | 22049.1051713014@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
David Goodenough <david(dot)goodenough(at)btconnect(dot)com> writes:
> I have a Postgresql 7.2.2 installation, and I am having a problem with
> the results of doing a pg_dumpall -g.
> It dumps out three users, ignoring the fourth.
Looking at the source code for 7.2's pg_dumpall, it's trying to dump
everything except the postgres user --- on the assumption that you'll
recreate the postgres user at initdb time. The code is
$PSQL -d template1 -At -c "\
SELECT
'CREATE USER \"' || usename || '\" WITH SYSID ' || usesysid
|| CASE WHEN passwd IS NOT NULL THEN ' PASSWORD ''' || passwd || '''' else '' end
|| CASE WHEN usecreatedb THEN ' CREATEDB'::text ELSE ' NOCREATEDB' END
|| CASE WHEN usesuper THEN ' CREATEUSER'::text ELSE ' NOCREATEUSER' END
|| CASE WHEN valuntil IS NOT NULL THEN ' VALID UNTIL '''::text
|| CAST(valuntil AS TIMESTAMP) || '''' ELSE '' END || ';'
FROM pg_shadow
WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template0');"
I'd guess that your missing user is the one who owns template0. Now
that should be the postgres user, unless you've been hacking on
pg_database ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2003-04-30 14:52:08 | Re: Optimizer not using index on 120M row table |
Previous Message | Gerhard Hintermayer | 2003-04-30 11:08:25 | Re: Backend memory leakage when inserting |