pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scot Kreienkamp <Scot.Kreienkamp@la-z-boy.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: PG9.1 migration to PG9.6, dump/restore issues
Date: Wed, 12 Sep 2018 10:39:35 -0400
Message-ID: <3002.1536763175@sss.pgh.pa.us> (raw)
In-Reply-To: <17082AAFC33A934082836458CB53494374C993BD@MONDB03.na.lzb.hq>
References: <17082AAFC33A934082836458CB53494374C993BD@MONDB03.na.lzb.hq>

Scot Kreienkamp <Scot.Kreienkamp@la-z-boy.com> writes:
> Restore completes successfully, but I noticed that the schema
> permissions are missing, possibly others as well (Is this a known
> issue?).

If you're talking about custom modifications you made to the permissions
of the "public" schema in particular, then yeah, that won't be tracked
(IIRC, it will be with newer source server versions, but not 9.1).
Otherwise, no, that's not expected.  Would you provide more detail?

> These are the commands I'm using now:
> pg_dump -sh $OLDSERVER  $DATABASE -f $BACKUPPATH/$DATABASE.schema.sql
> pg_dump -vj 4 -F d -h $OLDSERVER  $DATABASE -f $BACKUPPATH/DATABASE --no-synchronized-snapshots
> createdb $DATABASE
> psql -d $DATABASE -f $BACKUPPATH/$DATABASE.schema.sql
> pg_restore -evj 4 -d $DATABASE  $BACKUPPATH/$DATABASE   -a --disable-triggers

Also note that this recipe does not copy "global" objects (users and
tablespaces), nor does it restore any database-level properties.
You'd need to use pg_dumpall to transfer those things automatically.
(Possibly "pg_dumpall -g" would be a good starting point here.)

			regards, tom lane




view thread (9+ messages)  latest in thread

Message-ID: <3002.1536763175@sss.pgh.pa.us>
Permalink:  ../3002.1536763175@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3002.1536763175@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Scot.Kreienkamp@la-z-boy.com
  Subject: Re: PG9.1 migration to PG9.6, dump/restore issues
  In-Reply-To: <3002.1536763175@sss.pgh.pa.us>
  References: <17082AAFC33A934082836458CB53494374C993BD@MONDB03.na.lzb.hq> <3002.1536763175@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