Re: Creation date of postgres database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 30, 2006 at 02:05:24PM +0530, Pradeep Sharma wrote:
> Is there any way to get the date of creation of a database in Postgres? 
> Does postgres store this information in any system table.

I'm not aware that the creation time is stored anywhere (except
perhaps in query logs) but you might be able to infer it from the
modification times of the oldest files in the database's directory.
PG_VERSION looks like a good candidate -- the backend probably
doesn't modify it after the database is created, so if nothing at
the OS level has touched that file then its modification time should
reflect the database's creation time.

-- 
Michael Fuhr


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux