Re: Get the date of creation of objects in the database

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Get the date of creation of objects in the database
Дата
Msg-id 20160223035018.GB3127@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Get the date of creation of objects in the database  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Get the date of creation of objects in the database  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Venkata Balaji N
Дата:
Сообщение: Re: Live steraming replication setup issue!
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Get the date of creation of objects in the database