Skip to content

Commit 6a67d9d

Browse files
committed
Fix failure to reconnect as sequence's owner before issuing setval().
1 parent 9a25277 commit 6a67d9d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.40 2002/01/18 19:17:04 momjian Exp $
18+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.41 2002/02/06 17:27:50 tgl Exp $
1919
*
2020
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2121
*
@@ -311,9 +311,6 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
311311

312312
if ((reqs & REQ_SCHEMA) != 0) /* We want the schema */
313313
{
314-
/* Reconnect if necessary */
315-
_reconnectAsOwner(AH, NULL, te);
316-
317314
ahlog(AH, 1, "creating %s %s\n", te->desc, te->name);
318315
_printTocEntry(AH, te, ropt, false);
319316
defnDumped = true;
@@ -2033,6 +2030,9 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
20332030
{
20342031
char *pfx;
20352032

2033+
/* Reconnect if necessary */
2034+
_reconnectAsOwner(AH, NULL, te);
2035+
20362036
if (isData)
20372037
pfx = "Data for ";
20382038
else

src/bin/pg_dump/pg_dump.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.239 2002/01/25 18:49:31 tgl Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.240 2002/02/06 17:27:50 tgl Exp $
2626
*
2727
*-------------------------------------------------------------------------
2828
*/
@@ -4765,7 +4765,8 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool
47654765
last, (called ? "true" : "false"));
47664766

47674767
ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL,
4768-
query->data, "" /* Del */ , "", "", NULL, NULL);
4768+
query->data, "" /* Del */ , "", tbinfo.usename,
4769+
NULL, NULL);
47694770
}
47704771

47714772
if (!dataOnly)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy