Re: historical log of data records

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: historical log of data records
Дата
Msg-id 6e3e5cea05a44013d2dcbfddab96c3d9ad11238b.camel@cybertec.at
обсуждение исходный текст
Ответ на historical log of data records  (Sanjay Minni <sanjay.minni@gmail.com>)
Ответы Re: historical log of data records
Re: historical log of data records
Список pgsql-general
On Tue, 2021-11-16 at 13:56 +0530, Sanjay Minni wrote:
> I need to keep a copy of old data as the rows are changed. 
> 
> For a general RDBMS I could think of keeping all the data in the same table with a flag
> to indicate older copies of updated /  deleted rows or keep a parallel table and copy
> these rows into the parallel data under program / trigger control. Each has its pros and cons. 
> 
> In Postgres would i have to follow the same methods or are there any features / packages available ?

Yes, I would use one of these methods.

The only feature I can think of that may help is partitioning: if you have one partition
for the current data and one for the deleted data, then updating the flag would
automatically move the row between partitions, so you don't need a trigger.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Sanjay Minni
Дата:
Сообщение: reading this group other than thru mails
Следующее
От: Sanjay Minni
Дата:
Сообщение: Re: historical log of data records