Re: Proposal: Store "timestamptz" of database creation on "pg_database" - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Date
Msg-id CAM-w4HO89ZvrVXw=az6mNmRxMtfqjEDDZWaPffFqiTduW4dUPQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Store "timestamptz" of database creation on "pg_database"  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Thu, Jan 3, 2013 at 2:06 AM, Stephen Frost <sfrost@snowman.net> wrote:
> I'd be alright with this also, tbh.  Not preserving such information
> across pg_dump's wouldn't really be all *that* much of a loss.

I think it would be mandatory for pg_dump not to restore this info
actually. A fair amount of work has gone into pg_dump -s to ensure
that the output is identical for identical databases.  OIDs were
removed and the sort order was changed to be deterministic for
example. Any "alter table set creation time 'xxx'" will defeat that
entirely.

When last I managed a production Postgres database I would use pg_dump
-s to regenerate a schema file that was checked into revision control.
And when I migrated changes live I would rerun pg_dump -s and diff
that against the checked in schema.

-- 
greg



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pg_retainxlog for inclusion in 9.3?
Next
From: Samuel Vogel
Date:
Subject: Print b-tree tuples