Re: Way to quickly detect if database tables/columns/etc. were modified?

Поиск
Список
Период
Сортировка
Искать
От
John DeSoi
Тема
Re: Way to quickly detect if database tables/columns/etc. were modified?
Дата
Msg-id
3C423198-7167-4D3D-9C8D-DD1E6D470184@pgedit.com
Ответ на
Список
Дерево обсуждения
Way to quickly detect if database tables/columns/etc. were modified? Evan Martin <postgresql2@realityexists.net>
Re: Way to quickly detect if database tables/columns/etc. were modified? John DeSoi <desoi@pgedit.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Melvin Davidson <melvin6925@gmail.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: Way to quickly detect if database tables/columns/etc. were modified? Melvin Davidson <melvin6925@gmail.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Steve Crawford <scrawford@pinpointresearch.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Adrian Klaver <adrian.klaver@aklaver.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? John DeSoi <desoi@pgedit.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Melvin Davidson <melvin6925@gmail.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Evan Martin <postgresql2@realityexists.net>
Re: Way to quickly detect if database tables/columns/etc. were modified? Melvin Davidson <melvin6925@gmail.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Alban Hertroys <haramrae@gmail.com>
Re: Way to quickly detect if database tables/columns/etc. were modified? Melvin Davidson <melvin6925@gmail.com>

> On Oct 30, 2016, at 4:45 AM, Evan Martin  wrote:
> 
> If I have a query that reads from system tables like pg_class, pg_namespace, pg_attribute, pg_type, etc. and I'd like to cache the results in my application is there any fast way to detect when any changes have been made to these system catalogs? I don't  need to know exactly what has changed. Some kind of a global "database version" would do, just so I know that I need to invalidate my cache (the database definition is rarely modified in practice).

Maybe create an event trigger that updates a simple table with the last modification time or sends a notification?

https://www.postgresql.org/docs/current/static/sql-createeventtrigger.html

John DeSoi, Ph.D.


В списке pgsql-general по дате отправления
От: Alexander Farber
Дата:
От: Melvin Davidson
Дата:
FAQ