does postgres log the create/refresh of a materialized view anywhere?

Started by Jonathan Vanascoover 9 years ago6 messagesgeneral
Jump to latest
#1Jonathan Vanasco
postgres@2xlp.com

Is there a way to find out when a materialized view was created/refreshed? I couldn't find this information anywhere in the docs.

the use-case is that I wish to update a materialized view a few times a day in a clustered environment. i'd like to make sure one of the redundant nodes doesn't refresh if needed. I can log this manually in postgresql if needed, but was hoping there was some "timestamp" on the view in a system table.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Jonathan Vanasco (#1)
Re: does postgres log the create/refresh of a materialized view anywhere?

On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco <postgres@2xlp.com> wrote:

Is there a way to find out when a materialized view was
created/refreshed?

I can log this manually in postgresql if needed, but was hoping
there was some "timestamp" on the view in a system table.

This is not currently tracked in the system catalogs.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Melvin Davidson
melvin6925@gmail.com
In reply to: Kevin Grittner (#2)
Re: does postgres log the create/refresh of a materialized view anywhere?

On Tue, Dec 13, 2016 at 7:36 PM, Kevin Grittner <kgrittn@gmail.com> wrote:

On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco <postgres@2xlp.com>
wrote:

Is there a way to find out when a materialized view was
created/refreshed?

I can log this manually in postgresql if needed, but was hoping
there was some "timestamp" on the view in a system table.

This is not currently tracked in the system catalogs.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Kevin,
This goes back to a discussion of my request to add relcreated column to
pg_class.
/messages/by-id/CANu8FiyiRPGZ+gB=1JAYryX3HXCuQnFLSFgdzfXSvLMJ-jTc5w@mail.gmail.com
Apparently the naysayers do not feel it is worthwhile.

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

#4Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Melvin Davidson (#3)
Re: does postgres log the create/refresh of a materialized view anywhere?

On Tue, Dec 13, 2016 at 7:37 PM, Melvin Davidson <melvin6925@gmail.com> wrote:

On Tue, Dec 13, 2016 at 7:36 PM, Kevin Grittner <kgrittn@gmail.com> wrote:

On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco <postgres@2xlp.com> wrote:

Is there a way to find out when a materialized view was
created/refreshed?

I can log this manually in postgresql if needed, but was hoping
there was some "timestamp" on the view in a system table.

This is not currently tracked in the system catalogs.

This goes back to a discussion of my request to add relcreated
column to pg_class.
/messages/by-id/CANu8FiyiRPGZ+gB=1JAYryX3HXCuQnFLSFgdzfXSvLMJ-jTc5w@mail.gmail.com
Apparently the naysayers do not feel it is worthwhile.

Do you see relcreated as being something to set anew whenever the
data contents of a materialized view change due to the REFRESH
command? I wouldn't have thought so, but I guess the problem with
that proposal is that everyone has a different idea of what the
semantics of the column would be. Suggesting that field as the
solution here seems to reinforce that perception, anyway.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5Melvin Davidson
melvin6925@gmail.com
In reply to: Kevin Grittner (#4)
Re: does postgres log the create/refresh of a materialized view anywhere?

On Tue, Dec 13, 2016 at 8:50 PM, Kevin Grittner <kgrittn@gmail.com> wrote:

On Tue, Dec 13, 2016 at 7:37 PM, Melvin Davidson <melvin6925@gmail.com>
wrote:

On Tue, Dec 13, 2016 at 7:36 PM, Kevin Grittner <kgrittn@gmail.com>

wrote:

On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco <postgres@2xlp.com>

wrote:

Is there a way to find out when a materialized view was
created/refreshed?

I can log this manually in postgresql if needed, but was hoping
there was some "timestamp" on the view in a system table.

This is not currently tracked in the system catalogs.

This goes back to a discussion of my request to add relcreated
column to pg_class.
/messages/by-id/CANu8FiyiRPGZ+gB=

1JAYryX3HXCuQnFLSFgdzfXSvLMJ-jTc5w@mail.gmail.com

Apparently the naysayers do not feel it is worthwhile.

Do you see relcreated as being something to set anew whenever the
data contents of a materialized view change due to the REFRESH
command? I wouldn't have thought so, but I guess the problem with
that proposal is that everyone has a different idea of what the
semantics of the column would be. Suggesting that field as the
solution here seems to reinforce that perception, anyway.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Originally, all I wanted was a column to record the creation date/time of
an object. One reason it was debunked was that it would lead
to a request for an additional column to record changes in objects. I
maintain that both can be done, but others disagree,

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

#6Michael Paquier
michael@paquier.xyz
In reply to: Melvin Davidson (#5)
Re: does postgres log the create/refresh of a materialized view anywhere?

On Wed, Dec 14, 2016 at 11:19 AM, Melvin Davidson <melvin6925@gmail.com> wrote:

Originally, all I wanted was a column to record the creation date/time of an object. One reason it was debunked was that it would lead
to a request for an additional column to record changes in objects. I maintain that both can be done, but others disagree,

Event triggers could be used to track the creation or drop timestamp
of objects. Even if it is not supported for REFRESH, it may make sense
to support it in the firing matrix.
--
Michael

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general