From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Subject: Re: Table/View creation time
Date: Wed, 4 Jan 2017 09:38:28 +0200
Message-ID: <586CA674.5070107@matrix.gatewaynet.com> (raw)
In-Reply-To: <CANUg7LDK06QNfkxAXGT+EhFV=GFu5NdY8bHAqYLi0MHJY2NNGg@mail.gmail.com>
References: <CAGb7rSGSrdmJ5RObGAZ9G=V4N1J7Ju6z7OmJeNLeduvfKMQb-Q@mail.gmail.com>
<CANUg7LDK06QNfkxAXGT+EhFV=GFu5NdY8bHAqYLi0MHJY2NNGg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
On 03/01/2017 17:23, Payal Singh wrote:
> You might be able to get some useful info by running stat on $PGDATA/base/<table's relid> (for instance when the file was created). Don't think this is applicable for a view though.
Modern Linux'es do not support exposing creation time. EXT4 stores this though.
>
> A better way is to search for the respective DDL command in postgres log files, if you are logging all DDLs
>
> Payal
>
> Payal Singh,
> Database Administrator,
> OmniTI Computer Consulting Inc.
> Phone: 240.646.0770 x 253
>
> On Mon, Jan 2, 2017 at 5:17 AM, Ram DBA <postgresdbas@gmail.com <mailto:postgresdbas@gmail.com>> wrote:
>
> Hi team,
>
> Do we have a way of figuring out when a table/view is created in the postgres database?
>
> ram=# \dv
> List of relations
> Schema | Name | Type | Owner
> --------+--------+------+----------
> public | v_test | view | postgres
> (1 row)
>
>
> Thank you,
> Ram
>
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: achill@matrix.gatewaynet.com
Subject: Re: Table/View creation time
In-Reply-To: <586CA674.5070107@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox