Re: Survey on backing up unlogged tables: help us with PostgreSQL development!

Поиск
Список
Период
Сортировка
От Jayadevan M
Тема Re: Survey on backing up unlogged tables: help us with PostgreSQL development!
Дата
Msg-id OF1C6643BB.1F08C996-ON652577E0.002BD21A-652577E0.002CBDE6@ibsplc.com
обсуждение исходный текст
Ответ на Re: Survey on backing up unlogged tables: help us with PostgreSQL development!  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список pgsql-general
Hello,

> > Thank you for the reply. But my doubt was not about layout, rather the

> > DMLs. If I do an insert into an 'unlogged' table, what happens to
that?
> > Will that be replicated in the slave (using PostgreSQL's inbuilt
> > replication)?
>
> What are the use-cases for replicating unlogged tables?
>
I do not have a use case for replicating unlogged tables. But I may use
temp/unlogged tables in my master to populate actual tables.

Say, I have a db archival/purge process. I populate temp tables with PKs
of my permanent tables and use that to drive my insertion into history
tables, deletion from live tables etc.

Pseudocode

Insert into mytemptable (id)  tables select mypk from liveable where
lastuseddate < archivedate;

insert into myhist select a.* from livetable  a join mytemp table on
a.mypk=mytemptable.id
delete from liveable where mypk in (select id from mytemp )

Reading about what goes into WAL tells me that the permanent table data
will be replicated all right even if the temp tables are not logged. Is
that right?

Regards,
Jayadevan





DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."






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

Предыдущее
От: "Marc Mamin"
Дата:
Сообщение: Re: Survey on backing up unlogged tables: help us with PostgreSQL development!
Следующее
От: Vangelis Katsikaros
Дата:
Сообщение: tablespace restore