pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5874: pg_dumpall CREATE DATABASE statements 'missing' parameters
2+ messages / 2 participants
[nested] [flat]

* BUG #5874: pg_dumpall CREATE DATABASE statements 'missing' parameters
@ 2011-02-09 09:57 Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
  2011-03-03 15:17 ` Re: BUG #5874: pg_dumpall CREATE DATABASE statements 'missing' parameters Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jan-Peter Seifert @ 2011-02-09 09:57 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5874
Logged by:          Jan-Peter Seifert
Email address:      Jan-Peter.Seifert@gmx.de
PostgreSQL version: 8.4.7
Operating system:   Windows 7 64-Bit
Description:        pg_dumpall CREATE DATABASE statements 'missing'
parameters
Details: 

Hello,

it's not really a bug ... but CREATE DATABASE statements for databases with
the same Locale/Encoding as the server miss the parameters ENCODING,
LC_COLLATE and LC_CTYPE. So you 'can't' migrate to a server with a different
Locale/Encoding setting.
I'd be very happy if one had the option to switch between OS specific names
e.g. German_Germany.28591 on Windows and de_DE on Linux automatically ( -b
WIN ) or manually ( -w German_Germany.28591,de_DE+...) as well.
I'd also be very happy if one could specify a comma separated list of
databases to skip (e.g. template1, postgres etc.)

Thank you very much,

Peter



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #5874: pg_dumpall CREATE DATABASE statements 'missing' parameters
  2011-02-09 09:57 BUG #5874: pg_dumpall CREATE DATABASE statements 'missing' parameters Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
@ 2011-03-03 15:17 ` Robert Haas <robertmhaas@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2011-03-03 15:17 UTC (permalink / raw)
  To: Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>; +Cc: pgsql-bugs

On Wed, Feb 9, 2011 at 4:57 AM, Jan-Peter Seifert
<Jan-Peter.Seifert@gmx.de> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5874
> Logged by:          Jan-Peter Seifert
> Email address:      Jan-Peter.Seifert@gmx.de
> PostgreSQL version: 8.4.7
> Operating system:   Windows 7 64-Bit
> Description:        pg_dumpall CREATE DATABASE statements 'missing'
> parameters
> Details:
>
> Hello,
>
> it's not really a bug ... but CREATE DATABASE statements for databases with
> the same Locale/Encoding as the server miss the parameters ENCODING,
> LC_COLLATE and LC_CTYPE. So you 'can't' migrate to a server with a different
> Locale/Encoding setting.
> I'd be very happy if one had the option to switch between OS specific names
> e.g. German_Germany.28591 on Windows and de_DE on Linux automatically ( -b
> WIN ) or manually ( -w German_Germany.28591,de_DE+...) as well.

These seem to go in opposite directions - if I'm understanding
correctly, we could solve the first problem by always emitting the
locale and encoding parameters, but then that'd make it more likely
that you would run into conflicts in the second case.

I think the best option may be to dump globals with pg_dumpall -g and
then back up each database with pg_dump -Fc.  The custom format dumps
are really nice (selective restore, parallel restore) and of course
that also gives you the option to create the database first and then
restore the dump into it, which would let you dodge this problem.

> I'd also be very happy if one could specify a comma separated list of
> databases to skip (e.g. template1, postgres etc.)

Seems like it could be useful, or maybe a list of databases to include
would be better, not sure.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-03-03 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 09:57 BUG #5874: pg_dumpall CREATE DATABASE statements 'missing' parameters Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
2011-03-03 15:17 ` Robert Haas <robertmhaas@gmail.com>

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