Re: Get the date of creation of objects in the database - Mailing list pgsql-general

From Stephen Frost
Subject Re: Get the date of creation of objects in the database
Date
Msg-id 20160223035018.GB3127@tamriel.snowman.net
Whole thread Raw
In response to Re: Get the date of creation of objects in the database  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Get the date of creation of objects in the database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
David,

* David G. Johnston (david.g.johnston@gmail.com) wrote:
> The only source of data for that question is the local filesystem.  If
> that is acceptable you can find examples online provided to others who have
> asked this question.

What on the local filesystem would help here..?  All you know from that
is when the relfilenode was created, but that's not the same as when the
table was created in the face of various commands that we have which
change the relfilenode..

> If you want something internal to the database the answer is no.  Those
> same searches will turn up the various reasons why such a feature has not
> gotten any strong traction from the developers.

> This was my search query:  "postgresql object creation time"

At least on a first blush look through the threads linked from such a
search, I'm unimpressed by the arguments against and note that there are
quite a few arguments for.

The summary of comments seems to be:

1) We don't know what we want

  Doesn't seem terribly hard to define.

  Object creation time (aka: CREATE TABLE time)
  Object modification time (aka: ALTER TABLE time)

  We could provide a function for 'last data modification time' which
  simply uses the filesystem modification time.

2) It'll be expensive to keep track of

  We often claim that we aren't too worried about DDL cost, and this
  would be a very small additional cost on top of that.  If it's
  measurable then perhaps we could avoid doing it for temp tables, but
  that strikes me as really the only case that it might be worthwhile
  and I'm not convinced it is.

Thanks!

Stephen

Attachment

pgsql-general by date:

Previous
From: Venkata Balaji N
Date:
Subject: Re: Live steraming replication setup issue!
Next
From: Tom Lane
Date:
Subject: Re: Get the date of creation of objects in the database