Skip site navigation (1) Skip section navigation (2)

Re: pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Niederland" <niederland(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: pg_restore
Date: 2005-01-23 01:00:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-hackers-win32
"Niederland" <niederland(at)gmail(dot)com> writes:
> System: the released Postgres 8.0, winXP

> Using:
> pg_dump --format=t --blobs myDB > DBFile
> pg_restore --create -dbname=crm DBFile

> Resulted in:
> pg_restore: [archiver] unsupported version (1.13) in file header

Come to think of it, I'll bet that you cannot use "> DBFile" on Windows
because it ends up opening the archive file in text instead of binary
mode.  SetOutput() in pg_backup_archiver.c tries to work around this by

	fn = fileno(stdout);
	AH->OF = fdopen(dup(fn), PG_BINARY_W);

but it wouldn't surprise me in the least to learn that that doesn't work
on Windows.

Does it work if you use
	pg_dump --format=t --blobs -f DBFile myDB
?  Can anyone on pgsql-hackers-win32 think of a way around this?

			regards, tom lane

In response to


pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2005-01-23 01:23:34
Subject: Re: pg_autovacuum fails to start - 8.0 Release
Previous:From: Nicolai TufarDate: 2005-01-23 00:08:47
Subject: Re: [HACKERS] %2$, %1$ gettext placeholder replacement is not working under Win32

pgsql-general by date

Next:From: Quinton LawsonDate: 2005-01-23 01:57:50
Subject: Windows 2000 Slower Than Windows XP
Previous:From: Michael FuhrDate: 2005-01-22 23:48:14
Subject: Re: About PostgreSQL 8.0

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group