Re: Maintaining a materialized view only on a replica

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: Maintaining a materialized view only on a replica
Дата
Msg-id C8B94C63-118B-401D-BA6D-BE98768D301B@unicell.co.il
обсуждение исходный текст
Ответ на Re: Maintaining a materialized view only on a replica  (Craig Ringer <ringerc@ringerc.id.au>)
Список pgsql-general
It's not an issue with the replication software. The reason the parts of the transaction are written out of order is that the original system that writes them in the first place makes no guarantees as to the order of writing.

So basically my question is whether a trigger that runs a full aggregate SQL query on the table that triggered it, joining with another table, checking the rows returned and doing the insert in the second table only when the data is complete is feasible, because that's basically what I need to do.

Herouth


On 05/09/2012, at 00:52, Craig Ringer wrote:

Subject changed to describe the problem. Reply in-line.

On 09/04/2012 07:57 PM, Herouth Maoz wrote:

The issue is that when an insert or an update is fired, I can't say
whether all the segments of the same transaction have been written yet,
and if only some of them were written, there is no guarantee on the
order in which they are written.

Does Slony-I provide stronger guarantees? If your replication doesn't guarantee ordering then you're going to have a very hard time doing this.

Is this
feasible at all? How would you achieve it?

I'd try to find a replication system that guaranteed ordering if at all possible.

--
Craig Ringer


--
חרות מעוז
יוניסל פתרונות סלולריים מתקדמים
☎ 03-5181717 שלוחה 742

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: postgres process got stuck in "notify interrupt waiting" status
Следующее
От: Dipti Bharvirkar
Дата:
Сообщение: Re: Error stopping postgresql service on a standby server.