pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14088: pg_restore, --schema, causes TOC entries from even executing.
2+ messages / 2 participants
[nested] [flat]

* BUG #14088: pg_restore, --schema, causes TOC entries from even executing.
@ 2016-04-15 19:12  psi-jack@linux-help.org
  0 siblings, 1 reply; 2+ messages in thread

From: psi-jack@linux-help.org @ 2016-04-15 19:12 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14088
Logged by:          Eric Renfro
Email address:      psi-jack@linux-help.org
PostgreSQL version: 9.4.5
Operating system:   CentOS 6
Description:        

I found a bug when trying to backup, stripping BDR schemas from databases to
restore to a non-BDR database, and this is a pretty serious bug.

When using pg_restore -l --schema=public with pg_restore -L from that data,
the -l does not contain information needed for the --create flag to work.
For example, DATABASE TOC entries are missing from the -l output.

Likewise, when using pg_restore --schema=public --create, again, key TOC
entries related to creation fail to exist because --schema is being used. 

This resulted in all create items not restoring with the --create flag used.




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



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

* Re: BUG #14088: pg_restore, --schema, causes TOC entries from even executing.
@ 2016-04-15 20:54  David G. Johnston <david.g.johnston@gmail.com>
  parent: psi-jack@linux-help.org
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2016-04-15 20:54 UTC (permalink / raw)
  To: psi-jack@linux-help.org; +Cc: pgsql-bugs

On Fri, Apr 15, 2016 at 12:12 PM, <psi-jack@linux-help.org> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14088
> Logged by:          Eric Renfro
> Email address:      psi-jack@linux-help.org
> PostgreSQL version: 9.4.5
> Operating system:   CentOS 6
> Description:
>
> I found a bug when trying to backup, stripping BDR schemas from databases
> to
> restore to a non-BDR database, and this is a pretty serious bug.
>
> When using pg_restore -l --schema=public with pg_restore -L from that data,
> the -l does not contain information needed for the --create flag to work.
> For example, DATABASE TOC entries are missing from the -l output.
>
> Likewise, when using pg_restore --schema=public --create, again, key TOC
> entries related to creation fail to exist because --schema is being used.
>
> This resulted in all create items not restoring with the --create flag
> used.
>

​My first impression is that this is working as designed.  The --create
flag has limitations and you seem to have discovered one of them.  If you
are going to play with subset restoration I'd suggest (and it might be
required) that the target database already exist.

You might want to consider placing the --schema=public on the pg_restore -L
command instead of pg_restore -l

You say "for example" above; but given that the only thing --create does is
create a database your example seems like it covers the entirety of the
complaint.  Am I missing something here?

David J.

​

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


end of thread, other threads:[~2016-04-15 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-15 19:12 BUG #14088: pg_restore, --schema, causes TOC entries from even executing. psi-jack@linux-help.org
2016-04-15 20:54 ` David G. Johnston <david.g.johnston@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