From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Srinivasa R Chava <s(dot)chava(at)wcom(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: pg_restore |
Date: | 2002-02-06 17:34:05 |
Message-ID: | 7622.1013016845@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Srinivasa R Chava <s(dot)chava(at)wcom(dot)com> writes:
> [ permissions error when restoring a sequence ]
I've applied the attached patch to 7.2 sources to fix this problem.
You could probably adapt it to 7.1.3 pg_dump, but I haven't looked.
regards, tom lane
*** src/bin/pg_dump/pg_backup_archiver.c.orig Fri Jan 18 14:18:18 2002
--- src/bin/pg_dump/pg_backup_archiver.c Wed Feb 6 12:27:50 2002
***************
*** 311,319 ****
if ((reqs & REQ_SCHEMA) != 0) /* We want the schema */
{
- /* Reconnect if necessary */
- _reconnectAsOwner(AH, NULL, te);
-
ahlog(AH, 1, "creating %s %s\n", te->desc, te->name);
_printTocEntry(AH, te, ropt, false);
defnDumped = true;
--- 311,316 ----
***************
*** 2032,2037 ****
--- 2029,2037 ----
_printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isData)
{
char *pfx;
+
+ /* Reconnect if necessary */
+ _reconnectAsOwner(AH, NULL, te);
if (isData)
pfx = "Data for ";
*** src/bin/pg_dump/pg_dump.c.orig Fri Jan 25 13:49:31 2002
--- src/bin/pg_dump/pg_dump.c Wed Feb 6 12:27:50 2002
***************
*** 4765,4771 ****
last, (called ? "true" : "false"));
ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL,
! query->data, "" /* Del */ , "", "", NULL, NULL);
}
if (!dataOnly)
--- 4765,4772 ----
last, (called ? "true" : "false"));
ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL,
! query->data, "" /* Del */ , "", tbinfo.usename,
! NULL, NULL);
}
if (!dataOnly)
From | Date | Subject | |
---|---|---|---|
Next Message | Phill Kenoyer | 2002-02-06 18:24:16 | Re: Persistent Connections with PHP and PostgreSQL |
Previous Message | Felipe Nascimento | 2002-02-06 16:34:58 | Persistent Connections with PHP and PostgreSQL |