Re: automatic restore point

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: automatic restore point
Дата
Msg-id d6ca5c16-ab9c-658d-2b4a-618f970ce4b2@2ndquadrant.com
обсуждение исходный текст
Ответ на RE: automatic restore point  ("Yotsunaga, Naoki" <yotsunaga.naoki@jp.fujitsu.com>)
Ответы Re: automatic restore point  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 06/09/2018 02:16, Yotsunaga, Naoki wrote:
> -----Original Message-----
> From: Yotsunaga, Naoki [mailto:yotsunaga.naoki@jp.fujitsu.com] 
> Sent: Tuesday, June 26, 2018 10:18 AM
> To: Postgres hackers <pgsql-hackers@postgresql.org>
> Subject: automatic restore point
> 
>> Hi, I attached a patch to output the LSN before execution to the server log >when executing a specific command and
accidentallyerasing data.
 
> 
> Since there was an error in the attached patch, I attached the modified patch.

I think this should be done using event triggers.  Right now, you just
have it hardcoded to TRUNCATE and DROP TABLE, which seems somewhat
arbitrary.  With event triggers, you have the full flexibility to do
what you want.  You can pick which commands to apply it to, you can log
the LSN, you can create restore points, etc.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: ALTER TABLE on system catalogs
Следующее
От: Andres Freund
Дата:
Сообщение: Re: ALTER TABLE on system catalogs