pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Srinivasa R Chava <s.chava@wcom.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_restore
Date: Wed, 06 Feb 2002 12:34:05 -0500
Message-ID: <7622.1013016845@sss.pgh.pa.us> (raw)
In-Reply-To: <3C615EA9.E5A8933@wcom.com>
References: <66d229f1.0202060747.39b66049@posting.google.com>
	<6699.1013013210@sss.pgh.pa.us>
	<3C615EA9.E5A8933@wcom.com>

Srinivasa R Chava <s.chava@wcom.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


inline patch 1: src/bin/pg_dump/pg_backup_archiver.c, src/bin/pg_dump/pg_dump.c (+5/-4 lines) download inline-1.patch*** 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)

view thread (25+ messages)  latest in thread

Message-ID: <7622.1013016845@sss.pgh.pa.us>
Permalink:  ../7622.1013016845@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7622.1013016845@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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, s.chava@wcom.com
  Subject: Re: pg_restore
  In-Reply-To: <7622.1013016845@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