Re: [GENERAL] 6.5.1 pg_dump adds "connect as" line

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: Ted Nolan SRI Augusta GA <ted(at)ags(dot)ga(dot)erg(dot)sri(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [GENERAL] 6.5.1 pg_dump adds "connect as" line
Date: 1999-08-28 05:03:42
Message-ID: 19990828000342.A17199@wallace.ece.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Aug 27, 1999 at 10:34:58PM -0400, Ted Nolan SRI Augusta GA wrote:
> Folks,
>
> Just noticed this: I did a pg_dump on a database I wanted to send to
> someone (from 6.5.1 on NT), and the dump file included a "connect as"
> line.
>
> This was bad, because we don't share a user namespace, and when he did
>
> psql < dumpfile
>
> it died because my user did not exist on his machine. (We used sed to
> edit it out and continue from there..)
>
> 6.5 on Solaris does not emit this line, and reloads on machines with
> different users work fine..
>
> Is this a bug, or a feature I don't understand?

New, poorly documented default of an old feature. It's always been
recommended that when using pg_dump for backup, the -z switch be used,
to dump ACLs (Access Control Lists) As of 6.5.1, this has been made the
default behavior. I call it poorly documented only because this bit me
as well recently, for the same reason, and the switch added to turn ACL
dumping off ( -x ) is not documented in the usage message. I went and
grovelled in the source to find it. Patch below:

--- pg_dump.c~ Mon Jul 26 10:43:34 1999
+++ pg_dump.c Fri Aug 27 23:59:41 1999
@@ -160,7 +160,9 @@
fprintf(stderr,
"\t -v \t\t verbose\n");
fprintf(stderr,
- "\t -z \t\t dump ACLs (grant/revoke)\n");
+ "\t -z \t\t dump ACLs (grant/revoke) on by default\n");
+ fprintf(stderr,
+ "\t -x \t\t don't dump ACLs\n");
fprintf(stderr,
"\nIf dbname is not supplied, then the DATABASE environment "
"variable value is used.\n");

--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri 1999-08-28 22:47:26 Re: [GENERAL] Hardware optimising
Previous Message Ted Nolan SRI Augusta GA 1999-08-28 02:34:58 6.5.1 pg_dump adds "connect as" line