Обсуждение: PITR

Поиск
Список
Период
Сортировка

PITR

От
Rajesh Kumar
Дата:
Hi

A person dropped the table and don't know time of drop.

How do I do PITR. Backup strategy is weekly full backup and daily differential backup. Using pgbackrest.

Also. In future how do i monitor time of drop commands. 

Re: PITR

От
Holger Jakobs
Дата:
Am 22.11.23 um 09:11 schrieb Rajesh Kumar:
> Hi
>
> A person dropped the table and don't know time of drop.
>
> How do I do PITR. Backup strategy is weekly full backup and daily 
> differential backup. Using pgbackrest.
>
> Also. In future how do i monitor time of drop commands.


Monitoring DDL commands works fine using event triggers

https://www.postgresql.org/docs/current/event-triggers.html

Code of event triggers may even fail a command by raising an exception 
preventing the command becoming effective.

Regards,

Holger


-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012


Вложения

Re: PITR

От
Laurenz Albe
Дата:
On Wed, 2023-11-22 at 13:41 +0530, Rajesh Kumar wrote:
> A person dropped the table and don't know time of drop.
>
> How do I do PITR. Backup strategy is weekly full backup and daily differential backup. Using pgbackrest.
>
> Also. In future how do i monitor time of drop commands. 

You can monitor that by setting "log_statement = 'ddl'".

Yours,
Laurenz Albe