From: | Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com> |
---|---|
To: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: In which case PG_VERSION file updates ? |
Date: | 2011-09-26 14:25:15 |
Message-ID: | CA+h6Ahhpnh5GaCKaWC2_DEdDPooZ+Vqy=HyQenrcE+yFH1UuZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>
> From what I can see, PG_VERSION is written at database creation to document
> the
> major version of the Postgres instance used to create the database. Since
> it
> only holds the major version string (i.e. 9.0) it is not touched during
> minor
> updates, for example 9.0.0 --> 9.0.1. Grepping the pg_upgrade code shows
> it
> might touch PG_VERSION. A quick grep on the rest of the source code shows
> only
> initdb writing out PG_VERSION, though it is checked by other code. This is
> by no
> means an in depth look and it would take some one with more knowledge of
> Postgres internals to give you a definitive answer. Might be worth a post
> on -
> hackers.
Thank you Adrian Klaver / Scott Marlowe for your valuable inputs. I got
clarified.
As said, PG_VERSION file is created at the time of Database creation.
Sometimes, question arises that at what time database created. For this we
don't have any information to get from pg_catalogs, so with PG_VERSION file
timestamp we can pull database creation time.
However, with your inputs its clear that when PG_VERSION file is touched. In
pg_upgrade or any of the Postgres Internals touching PG_VERSION file will
never get exact database creation time.
I am not knowing why database creation time is not considered to be in
pg_catalogs.
-- Raghav
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2011-09-26 14:30:08 | Re: Sending Results From One Function As Input into Another Function |
Previous Message | DUPREZ Cédric | 2011-09-26 14:13:26 | Problem with pg_upgrade from 9.0 to 9.1 under Ubuntu x64 |