pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Date created for tables
21+ messages / 11 participants
[nested] [flat]

* Date created for tables
@ 2019-12-05 17:10  Chloe Dives <Chloe.Dives@cantabcapital.com>
  0 siblings, 4 replies; 21+ messages in thread

From: Chloe Dives @ 2019-12-05 17:10 UTC (permalink / raw)
  To: pgsql-general

Having moved to PostgreSQL from Oracle a few years ago I have been generally very impressed by Postgres, but there are a few things that I still miss. One of those is being able to see the created and last modified dates for database objects.

Is this something that has been considered for implementation?

Thanks in advance,
Chloe

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-05 19:01  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Chloe Dives <Chloe.Dives@cantabcapital.com>
  3 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2019-12-05 19:01 UTC (permalink / raw)
  To: Chloe Dives <Chloe.Dives@cantabcapital.com>; +Cc: pgsql-general

Chloe Dives <Chloe.Dives@cantabcapital.com> writes:
> Having moved to PostgreSQL from Oracle a few years ago I have been generally very impressed by Postgres, but there are a few things that I still miss. One of those is being able to see the created and last modified dates for database objects.
> Is this something that has been considered for implementation?

It's been considered, and rejected, many times.  Aside from the overhead
involved, there are too many different ideas of what such dates ought to
mean (e.g., what should happen during dump/restore? does a failed
transaction update last-modified? etc etc).  You can search the
project's mailing list archives if you want to read the prior discussions.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-05 19:02  Justin <zzzzz.graf@gmail.com>
  parent: Chloe Dives <Chloe.Dives@cantabcapital.com>
  3 siblings, 0 replies; 21+ messages in thread

From: Justin @ 2019-12-05 19:02 UTC (permalink / raw)
  To: Chloe Dives <Chloe.Dives@cantabcapital.com>; +Cc: pgsql-general

Hi Tom

can't we get access to this information in a backwards way by using
pg_xact_commit_timestamp()  then query the system catalog tables xmin entry
for the relevant object???

this requires turning on pg_xact_commit_timestamp
https://www.postgresql.org/docs/current/runtime-config-replication.html

will not show the creation date as it will be lost after an update and
vacuum ...





On Thu, Dec 5, 2019 at 12:10 PM Chloe Dives <Chloe.Dives@cantabcapital.com>
wrote:

> Having moved to PostgreSQL from Oracle a few years ago I have been
> generally very impressed by Postgres, but there are a few things that I
> still miss. One of those is being able to see the created and last modified
> dates for database objects.
>
>
>
> Is this something that has been considered for implementation?
>
>
>
> Thanks in advance,
>
> Chloe
>
>
>
>
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-05 19:10  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Chloe Dives <Chloe.Dives@cantabcapital.com>
  3 siblings, 0 replies; 21+ messages in thread

From: Adrian Klaver @ 2019-12-05 19:10 UTC (permalink / raw)
  To: Chloe Dives <Chloe.Dives@cantabcapital.com>; pgsql-general

On 12/5/19 9:10 AM, Chloe Dives wrote:
> Having moved to PostgreSQL from Oracle a few years ago I have been 
> generally very impressed by Postgres, but there are a few things that I 
> still miss. One of those is being able to see the created and last 
> modified dates for database objects.
> 
> Is this something that has been considered for implementation?

An alternative?:

https://www.postgresql.org/message-id/ABA5562F-56A9-4AB1-95D6-398215015DBD%40gmail.com

> 
> Thanks in advance,
> 
> Chloe
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-06 01:12  Ron <ronljohnsonjr@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Ron @ 2019-12-06 01:12 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 12/5/19 1:01 PM, Tom Lane wrote:
> Chloe Dives <Chloe.Dives@cantabcapital.com> writes:
>> Having moved to PostgreSQL from Oracle a few years ago I have been generally very impressed by Postgres, but there are a few things that I still miss. One of those is being able to see the created and last modified dates for database objects.
>> Is this something that has been considered for implementation?
> It's been considered, and rejected, many times.  Aside from the overhead
> involved, there are too many different ideas of what such dates ought to
> mean (e.g., what should happen during dump/restore? does a failed
> transaction update last-modified? etc etc).  You can search the
> project's mailing list archives if you want to read the prior discussions.

All the other RDBMSs seem to have figured it out.

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-06 01:40  Michael Paquier <michael@paquier.xyz>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Michael Paquier @ 2019-12-06 01:40 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

On Thu, Dec 05, 2019 at 07:12:22PM -0600, Ron wrote:
> On 12/5/19 1:01 PM, Tom Lane wrote:
>> It's been considered, and rejected, many times.  Aside from the overhead
>> involved, there are too many different ideas of what such dates ought to
>> mean (e.g., what should happen during dump/restore? does a failed
>> transaction update last-modified? etc etc).  You can search the
>> project's mailing list archives if you want to read the prior discussions.
> 
> All the other RDBMSs seem to have figured it out.

It does not necessarily mean that Postgres has to do it.  FWIW, you
can track that using an even trigger for CREATE TABLE or other objects
which inserts the following in a table of your choice for a given
database:
- The timestamp of the transaction.
- The object name.
- Its class ID, say pg_class::regclass for a table, etc.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-06 02:50  Ron <ronljohnsonjr@gmail.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 21+ messages in thread

From: Ron @ 2019-12-06 02:50 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/5/19 7:40 PM, Michael Paquier wrote:
> On Thu, Dec 05, 2019 at 07:12:22PM -0600, Ron wrote:
>> On 12/5/19 1:01 PM, Tom Lane wrote:
>>> It's been considered, and rejected, many times.  Aside from the overhead
>>> involved, there are too many different ideas of what such dates ought to
>>> mean (e.g., what should happen during dump/restore? does a failed
>>> transaction update last-modified? etc etc).  You can search the
>>> project's mailing list archives if you want to read the prior discussions.
>> All the other RDBMSs seem to have figured it out.
> It does not necessarily mean that Postgres has to do it.

That's not what I wrote.

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 01:01  Bruce Momjian <bruce@momjian.us>
  parent: Chloe Dives <Chloe.Dives@cantabcapital.com>
  3 siblings, 1 reply; 21+ messages in thread

From: Bruce Momjian @ 2019-12-24 01:01 UTC (permalink / raw)
  To: Chloe Dives <Chloe.Dives@cantabcapital.com>; +Cc: pgsql-general

On Thu, Dec  5, 2019 at 05:10:20PM +0000, Chloe Dives wrote:
> Having moved to PostgreSQL from Oracle a few years ago I have been generally
> very impressed by Postgres, but there are a few things that I still miss. One
> of those is being able to see the created and last modified dates for database
> objects.
> 
>  
> 
> Is this something that has been considered for implementation?

I wrote a blog about this:

	https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 02:14  Ron <ronljohnsonjr@gmail.com>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 4 replies; 21+ messages in thread

From: Ron @ 2019-12-24 02:14 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/23/19 7:01 PM, Bruce Momjian wrote:
> On Thu, Dec  5, 2019 at 05:10:20PM +0000, Chloe Dives wrote:
>> Having moved to PostgreSQL from Oracle a few years ago I have been generally
>> very impressed by Postgres, but there are a few things that I still miss. One
>> of those is being able to see the created and last modified dates for database
>> objects.
>>
>>   
>>
>> Is this something that has been considered for implementation?
> I wrote a blog about this:
>
> 	https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017

You all are *grossly* over-complicating this.

By creation time, "we DBAs" think the time we ran "CREATE object", not when 
pg_dump, pg_basebackup and pg_update ran.

Likewise, modification time is when we last ran an ALTER command ran, not 
when VACUUM ran (that's tracked elsewhere) or DML ran.

That's all.

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 02:23  Melvin Davidson <melvin6925@gmail.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  3 siblings, 0 replies; 21+ messages in thread

From: Melvin Davidson @ 2019-12-24 02:23 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

>You all are *grossly* over-complicating this.
Agree +1


On Mon, Dec 23, 2019 at 9:14 PM Ron <ronljohnsonjr@gmail.com> wrote:

> On 12/23/19 7:01 PM, Bruce Momjian wrote:
>
> On Thu, Dec  5, 2019 at 05:10:20PM +0000, Chloe Dives wrote:
>
> Having moved to PostgreSQL from Oracle a few years ago I have been generally
> very impressed by Postgres, but there are a few things that I still miss. One
> of those is being able to see the created and last modified dates for database
> objects.
>
>
>
> Is this something that has been considered for implementation?
>
> I wrote a blog about this:
>
> 	https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017
>
>
> You all are *grossly* over-complicating this.
>
> By creation time, "we DBAs" think the time we ran "CREATE object", not
> when pg_dump, pg_basebackup and pg_update ran.
>
> Likewise, modification time is when we last ran an ALTER command ran, not
> when VACUUM ran (that's tracked elsewhere) or DML ran.
>
> That's all.
>
> --
> Angular momentum makes the world go 'round.
>


-- 
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command – UXC*
Employment by invitation only!

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 08:07  Thomas Kellerer <spam_eater@gmx.net>
  parent: Ron <ronljohnsonjr@gmail.com>
  3 siblings, 0 replies; 21+ messages in thread

From: Thomas Kellerer @ 2019-12-24 08:07 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Ron schrieb am 24.12.2019 um 03:14:
>>> Having moved to PostgreSQL from Oracle a few years ago I have been generally
>>> very impressed by Postgres, but there are a few things that I still miss. One
>>> of those is being able to see the created and last modified dates for database
>>> objects.
>>>
>>> Is this something that has been considered for implementation?
>> I wrote a blog about this:
>>
>> 	https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017
>
> You all are *grossly* over-complicating this.
>
> By creation time, "we DBAs" think the time we ran "CREATE object", not when pg_dump, pg_basebackup and pg_update ran.
>
> Likewise, modification time is when we last ran an ALTER command ran, not when VACUUM ran (that's tracked elsewhere) or DML ran.
>
> That's all.

+1

Although I don't really need this, there were a few situations where this came in handy in Oracle.

I think _any_ tracking would already help those people that need something like that.
Simply picking the easiest implementation and documenting the situations where those columns are updated would probably be enough.







^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 14:53  Fabrízio de Royes Mello <fabrizio@timbira.com.br>
  parent: Ron <ronljohnsonjr@gmail.com>
  3 siblings, 0 replies; 21+ messages in thread

From: Fabrízio de Royes Mello @ 2019-12-24 14:53 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Em seg., 23 de dez. de 2019 às 23:14, Ron <ronljohnsonjr@gmail.com>
escreveu:
>
> You all are grossly over-complicating this.
>

Maybe we are really very conservative, but everyone needs to
understand that every single piece of code added to core is our
responsibility to maintain and make sure don't break the whole thing.

I know it is a desired feature but on the other hand we put a lot of effort
to make PostgreSQL very extensible, so IMHO why don't put effort to create
an extension to implement this feature instead of trying repeatedly to get
it into the core without any success.

Using EventTriggers is very easy to get a very first version tracking local
objects and if we need to add shared objects (databases, roles,
tablespaces) we can use hooks and some piece of C code to do the job.

Regards,

--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 16:39  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  3 siblings, 1 reply; 21+ messages in thread

From: Adrian Klaver @ 2019-12-24 16:39 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org

On 12/23/19 6:14 PM, Ron wrote:
> On 12/23/19 7:01 PM, Bruce Momjian wrote:
>> On Thu, Dec  5, 2019 at 05:10:20PM +0000, Chloe Dives wrote:
>>> Having moved to PostgreSQL from Oracle a few years ago I have been generally
>>> very impressed by Postgres, but there are a few things that I still miss. One
>>> of those is being able to see the created and last modified dates for database
>>> objects.
>>>
>>>   
>>>
>>> Is this something that has been considered for implementation?
>> I wrote a blog about this:
>>
>> 	https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017
> 
> You all are *grossly* over-complicating this.

Not really. This discussion has come up before and it starts with the 
simple case of timestamp the initial CREATE. This would suffice for some 
folks. However, it then progresses into a request for full object audit 
system. I understand why there is no great desire to start down this 
path by the developers, they know the pressure would be on to expand the 
code. As Fabrízio mentions in another post this is something that could 
be covered in an extension. FYI, I do it by using Sqitch for my schema 
object creation.

> 
> By creation time, "we DBAs" think the time we ran "CREATE object", not 
> when pg_dump, pg_basebackup and pg_update ran.
> 
> Likewise, modification time is when we last ran an ALTER command ran, 
> not when VACUUM ran (that's tracked elsewhere) or DML ran.
> 
> That's all.
> 
> -- 
> Angular momentum makes the world go 'round.


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 16:44  Ron <ronljohnsonjr@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Ron @ 2019-12-24 16:44 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/24/19 10:39 AM, Adrian Klaver wrote:
> On 12/23/19 6:14 PM, Ron wrote:
>> On 12/23/19 7:01 PM, Bruce Momjian wrote:
>>> On Thu, Dec  5, 2019 at 05:10:20PM +0000, Chloe Dives wrote:
>>>> Having moved to PostgreSQL from Oracle a few years ago I have been 
>>>> generally
>>>> very impressed by Postgres, but there are a few things that I still 
>>>> miss. One
>>>> of those is being able to see the created and last modified dates for 
>>>> database
>>>> objects.
>>>>
>>>>
>>>> Is this something that has been considered for implementation?
>>> I wrote a blog about this:
>>>
>>>     https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017
>>
>> You all are *grossly* over-complicating this.
>
> Not really. This discussion has come up before and it starts with the 
> simple case of timestamp the initial CREATE. This would suffice for some 
> folks. However, it then progresses into a request for full object audit 
> system. 

This is directly akin to Henry Ford refusing to build cars because people 
will *someday*** want computerized fuel injection, crumple zones and air bags.

> I understand why there is no great desire to start down this path by the 
> developers, they know the pressure would be on to expand the code. As 
> Fabrízio mentions in another post this is something that could be covered 
> in an extension. FYI, I do it by using Sqitch for my schema object creation.
>
>>
>> By creation time, "we DBAs" think the time we ran "CREATE object", not 
>> when pg_dump, pg_basebackup and pg_update ran.
>>
>> Likewise, modification time is when we last ran an ALTER command ran, not 
>> when VACUUM ran (that's tracked elsewhere) or DML ran.
>>
>> That's all.
>>
>> -- 
>> Angular momentum makes the world go 'round.
>
>

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 18:14  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Adrian Klaver @ 2019-12-24 18:14 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org

On 12/24/19 8:44 AM, Ron wrote:
> On 12/24/19 10:39 AM, Adrian Klaver wrote:
>> On 12/23/19 6:14 PM, Ron wrote:
>>> On 12/23/19 7:01 PM, Bruce Momjian wrote:

>>>>> Is this something that has been considered for implementation?
>>>> I wrote a blog about this:
>>>>
>>>> https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017
>>>
>>> You all are *grossly* over-complicating this.
>>
>> Not really. This discussion has come up before and it starts with the 
>> simple case of timestamp the initial CREATE. This would suffice for 
>> some folks. However, it then progresses into a request for full object 
>> audit system. 
> 
> This is directly akin to Henry Ford refusing to build cars because 
> people will *someday*** want computerized fuel injection, crumple zones 
> and air bags.

No it is following this:

https://commitfest.postgresql.org/26/

and this:

https://www.postgresql.org/message-id/20191223051726.GA30778%40fetter.org

and understanding there are finite resources and that not everything is 
going to get done and that choices have to be made. Given that there are 
alternatives available I can see why this choice does not rise to the 
level of imminent action.

> 
>> I understand why there is no great desire to start down this path by 
>> the developers, they know the pressure would be on to expand the code. 
>> As Fabrízio mentions in another post this is something that could be 
>> covered in an extension. FYI, I do it by using Sqitch for my schema 
>> object creation.
>>



-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 18:31  Ron <ronljohnsonjr@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Ron @ 2019-12-24 18:31 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/24/19 12:14 PM, Adrian Klaver wrote:
> On 12/24/19 8:44 AM, Ron wrote:
>> On 12/24/19 10:39 AM, Adrian Klaver wrote:
>>> On 12/23/19 6:14 PM, Ron wrote:
>>>> On 12/23/19 7:01 PM, Bruce Momjian wrote:
>
>>>>>> Is this something that has been considered for implementation?
>>>>> I wrote a blog about this:
>>>>>
>>>>> https://momjian.us/main/blogs/pgblog/2017.html#November_21_2017
>>>>
>>>> You all are *grossly* over-complicating this.
>>>
>>> Not really. This discussion has come up before and it starts with the 
>>> simple case of timestamp the initial CREATE. This would suffice for some 
>>> folks. However, it then progresses into a request for full object audit 
>>> system. 
>>
>> This is directly akin to Henry Ford refusing to build cars because people 
>> will *someday*** want computerized fuel injection, crumple zones and air 
>> bags.
>
> No it is following this:
>
> https://commitfest.postgresql.org/26/
>
> and this:
>
> https://www.postgresql.org/message-id/20191223051726.GA30778%40fetter.org
>
> and understanding there are finite resources and that not everything is 
> going to get done and that choices have to be made. Given that there are 
> alternatives available I can see why this choice does not rise to the 
> level of imminent action.

If there's not enough time and motivation for the developers to implement 
CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in 
the first place.  We're adults; we understand that OSS projects have limited 
resources, and won't go off and pout in the corner.

But that's not what y'all said.  "It's too complicated, mission creep, blah 
blah blah" just extended way too long.

>
>>
>>> I understand why there is no great desire to start down this path by the 
>>> developers, they know the pressure would be on to expand the code. As 
>>> Fabrízio mentions in another post this is something that could be 
>>> covered in an extension. FYI, I do it by using Sqitch for my schema 
>>> object creation.
>>>
>
>
>

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 19:14  Rob Sargent <robjsargent@gmail.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Rob Sargent @ 2019-12-24 19:14 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org



> If there's not enough time and motivation for the developers to implement CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in the first place.  We're adults; we understand that OSS projects have limited resources, and won't go off and pout in the corner.
> 
> But that's not what y'all said.  "It's too complicated, mission creep, blah blah blah" just extended way too long.
>> 
Is there a list of purported uses cases for these two attributes (other than auditing)?  Especially anything to do with managing the data as they currently exist? 


> 
> -- 
> Angular momentum makes the world go 'round.
> 
> 





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-24 19:47  Ron <ronljohnsonjr@gmail.com>
  parent: Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Ron @ 2019-12-24 19:47 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/24/19 1:14 PM, Rob Sargent wrote:
>> If there's not enough time and motivation for the developers to implement CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in the first place.  We're adults; we understand that OSS projects have limited resources, and won't go off and pout in the corner.
>>
>> But that's not what y'all said.  "It's too complicated, mission creep, blah blah blah" just extended way too long.
> Is there a list of purported uses cases for these two attributes (other than auditing)?  Especially anything to do with managing the data as they currently exist?

I've used last_altered for comparing tables on Staging and Prod database.

If, for example, the last_altered on a prod table is *earlier* than 
last_altered on the staging table, then that's a *strong hint* that the 
staging and prod schema are out of sync, and more detailed examination is 
required.

Another example is that -- since username is also recorded in other RDBMSs 
--it's useful when the customer is screaming at your boss asking who made 
that unauthorized modification to production that's breaking their 
application.  You then show them that the table hasn't been altered in X 
months, and point the finger back at their incompetent developers.

All in all, it's not something that you use every day, but when it *is* 
useful, it's *very* useful.

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-25 02:58  Rob Sargent <robjsargent@gmail.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Rob Sargent @ 2019-12-25 02:58 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org



> On Dec 24, 2019, at 11:48 AM, Ron <ronljohnsonjr@gmail.com> wrote:
> 
>  On 12/24/19 1:14 PM, Rob Sargent wrote:
>> 
>>> If there's not enough time and motivation for the developers to implement CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in the first place.  We're adults; we understand that OSS projects have limited resources, and won't go off and pout in the corner.
>>> 
>>> But that's not what y'all said.  "It's too complicated, mission creep, blah blah blah" just extended way too long.
>> Is there a list of purported uses cases for these two attributes (other than auditing)?  Especially anything to do with managing the data as they currently exist? 
> 
> I've used last_altered for comparing tables on Staging and Prod database.  
> 
> If, for example, the last_altered on a prod table is earlier than last_altered on the staging table, then that's a strong hint that the staging and prod schema are out of sync, and more detailed examination is required.  
> 
> Another example is that -- since username is also recorded in other RDBMSs --it's useful when the customer is screaming at your boss asking who made that unauthorized modification to production that's breaking their application.  You then show them that the table hasn't been altered in X months, and point the finger back at their incompetent developers.
> 
> All in all, it's not something that you use every day, but when it is useful, it's very useful.
> 
> -- 
Don’t both of those examples hi-light flaws in the release procedures? 

> Angular momentum the world go 'round.

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-25 03:10  Ron <ronljohnsonjr@gmail.com>
  parent: Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Ron @ 2019-12-25 03:10 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/24/19 8:58 PM, Rob Sargent wrote:
>
>> On Dec 24, 2019, at 11:48 AM, Ron <ronljohnsonjr@gmail.com> wrote:
>>
>>  On 12/24/19 1:14 PM, Rob Sargent wrote:
>>>> If there's not enough time and motivation for the developers to implement CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in the first place.  We're adults; we understand that OSS projects have limited resources, and won't go off and pout in the corner.
>>>>
>>>> But that's not what y'all said.  "It's too complicated, mission creep, blah blah blah" just extended way too long.
>>> Is there a list of purported uses cases for these two attributes (other than auditing)?  Especially anything to do with managing the data as they currently exist?
>>
>> I've used last_altered for comparing tables on Staging and Prod database.
>>
>> If, for example, the last_altered on a prod table is *earlier* than 
>> last_altered on the staging table, then that's a *strong hint* that the 
>> staging and prod schema are out of sync, and more detailed examination is 
>> required.
>>
>> Another example is that -- since username is also recorded in other 
>> RDBMSs --it's useful when the customer is screaming at your boss asking 
>> who made that unauthorized modification to production that's breaking 
>> their application.  You then show them that the table hasn't been altered 
>> in X months, and point the finger back at their incompetent developers.
>>
>> All in all, it's not something that you use every day, but when it *is* 
>> useful, it's *very* useful.
>>
> Don’t both of those examples hi-light flaws in the release procedures?

And bug highlight flaws in the development process.  We're human, after all.

-- 
Angular momentum makes the world go 'round.

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Date created for tables
@ 2019-12-25 15:14  Melvin Davidson <melvin6925@gmail.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Melvin Davidson @ 2019-12-25 15:14 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

AFAICT, this is something that should have been designed into the initial
release of PostgreSQL, but rather than go down that road, I have thought
about this and will attempt to explain the "complexity" of implementing it,
which to date has only been described as too hard or, we don't have enough
developers or resources.

In order to record the CREATE and ALTER dates, it would require adding two
columns to pg_class. IE date_create & date_altered.
However, that being said, it would also then require a routine (or generic
routine) to populate those columns for EVERY system type that gets placed
in pg_class when created or altered. So tables, views, materialized views,
etc.

Now, AFAICT the implementation of new features has nothing to do with
complexity, but rather what has been determined to be required or desirable.

Indeed, there exists a feature request url, but AFAICT, little attention
has been payed to that url.

user feature request <https://postgresql.uservoice.com/forums/21853-general;


On Tue, Dec 24, 2019 at 10:11 PM Ron <ronljohnsonjr@gmail.com> wrote:

> On 12/24/19 8:58 PM, Rob Sargent wrote:
>
>
> On Dec 24, 2019, at 11:48 AM, Ron <ronljohnsonjr@gmail.com>
> <ronljohnsonjr@gmail.com> wrote:
>
>  On 12/24/19 1:14 PM, Rob Sargent wrote:
>
> If there's not enough time and motivation for the developers to implement CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in the first place.  We're adults; we understand that OSS projects have limited resources, and won't go off and pout in the corner.
>
> But that's not what y'all said.  "It's too complicated, mission creep, blah blah blah" just extended way too long.
>
> Is there a list of purported uses cases for these two attributes (other than auditing)?  Especially anything to do with managing the data as they currently exist?
>
>
> I've used last_altered for comparing tables on Staging and Prod database.
>
> If, for example, the last_altered on a prod table is *earlier* than
> last_altered on the staging table, then that's a *strong hint* that the
> staging and prod schema are out of sync, and more detailed examination is
> required.
>
> Another example is that -- since username is also recorded in other RDBMSs
> --it's useful when the customer is screaming at your boss asking who made
> that unauthorized modification to production that's breaking their
> application.  You then show them that the table hasn't been altered in X
> months, and point the finger back at their incompetent developers.
>
> All in all, it's not something that you use every day, but when it *is*
> useful, it's *very* useful.
>
> Don’t both of those examples hi-light flaws in the release procedures?
>
>
> And bug highlight flaws in the development process.  We're human, after
> all.
>
> --
> Angular momentum makes the world go 'round.
>


-- 
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command – UXC*
Employment by invitation only!

^ permalink  raw  reply  [nested|flat] 21+ messages in thread


end of thread, other threads:[~2019-12-25 15:14 UTC | newest]

Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 17:10 Date created for tables Chloe Dives <Chloe.Dives@cantabcapital.com>
2019-12-05 19:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-12-06 01:12   ` Ron <ronljohnsonjr@gmail.com>
2019-12-06 01:40     ` Michael Paquier <michael@paquier.xyz>
2019-12-06 02:50       ` Ron <ronljohnsonjr@gmail.com>
2019-12-05 19:02 ` Justin <zzzzz.graf@gmail.com>
2019-12-05 19:10 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-12-24 01:01 ` Bruce Momjian <bruce@momjian.us>
2019-12-24 02:14   ` Ron <ronljohnsonjr@gmail.com>
2019-12-24 02:23     ` Melvin Davidson <melvin6925@gmail.com>
2019-12-24 08:07     ` Thomas Kellerer <spam_eater@gmx.net>
2019-12-24 14:53     ` Fabrízio de Royes Mello <fabrizio@timbira.com.br>
2019-12-24 16:39     ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-12-24 16:44       ` Ron <ronljohnsonjr@gmail.com>
2019-12-24 18:14         ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-12-24 18:31           ` Ron <ronljohnsonjr@gmail.com>
2019-12-24 19:14             ` Rob Sargent <robjsargent@gmail.com>
2019-12-24 19:47               ` Ron <ronljohnsonjr@gmail.com>
2019-12-25 02:58                 ` Rob Sargent <robjsargent@gmail.com>
2019-12-25 03:10                   ` Ron <ronljohnsonjr@gmail.com>
2019-12-25 15:14                     ` Melvin Davidson <melvin6925@gmail.com>

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