pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ray Stell <stellr@cns.vt.edu>
To: pgsql-admin@postgresql.org
Subject: pg_dump --clean or dropdb?
Date: Thu, 21 Feb 2008 13:39:39 -0500
Message-ID: <20080221183939.GA31300@cns.vt.edu> (raw)

I have two versions of a db that I'd like to sync from a point-in-time
backup.  One set of data is perfered over the other so the db on the
target system will need to be tossed.

Will pg_dump --clean fix up the target or do I need to dropdb instead?
The favored data is in under 8.2.1 and the target system is 8.2.6.

The doc for pg_dump --clean says it will drop db objects, not the db, 
however it looks like it does, though the output order of events is
troubling.  Is there a loop in the create/drop area?.  

pgdump.test.dmp came from pg_dump -Fc :

$ strings pgdump.test.dmp 
PGDMP
ghiza
8.2.1
8.2.1
ENCODING
ENCODING
SET client_encoding = 'UTF8';
false
STDSTRINGS
STDSTRINGS
SET standard_conforming_strings = 'off';
false
1262
16384
ghiza
DATABASE
CREATE DATABASE ghiza WITH TEMPLATE = template0 ENCODING = 'UTF8';
DROP DATABASE ghiza;
...




view thread (2+ messages)  latest in thread

Message-ID: <20080221183939.GA31300@cns.vt.edu>
Permalink:  ../20080221183939.GA31300@cns.vt.edu/
Also on:    postgresql.org/message-id/20080221183939.GA31300@cns.vt.edu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: stellr@cns.vt.edu
  Subject: Re: pg_dump --clean or dropdb?
  In-Reply-To: <20080221183939.GA31300@cns.vt.edu>

* 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