Re: Batch replication ordering (was Re: [GENERAL] 32/64-bit

Поиск
Список
Период
Сортировка
От Steven Singer
Тема Re: Batch replication ordering (was Re: [GENERAL] 32/64-bit
Дата
Msg-id Pine.LNX.4.33.0304121939330.16736-100000@pcNavYkfAdm1.ykf.navtechinc.com
обсуждение исходный текст
Ответ на Re: Batch replication ordering (was Re: [GENERAL] 32/64-bit  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
>
> Does it matter if transactions that do not affect each other are committed
> on the slave in a different order than they were on the master?  I don't
> think that's guaranteed by the above (unless the inserts into
> replication_queue were deferred to transaction end), but I'm also
> uncertain if it's a constraint you're concerned with.


Well it all depends on what you mean by "Does not accect each other".  Do
2 transactions not affect each other if they touch different rows,tables,
or deal with data that is unrelated from the point of view of an
application query the database.

Consider the following transactions on the master
T1: Insert DeptId=1 INTO Department
T2: Insert EmpId=1,DeptId=1 INTO Employee

Those 2 transactions update different tables but if T2 is sent to slaves
before T2 then A) You might have foreign key violations and B) Even if you
don't have foreign keys someone querying the slave will see a database
that never existed(at any point in time) on the master.

But if you to ensuer that T1 and T2 are sent to the slave in the same
transaction(and you defered any constraint checks to the end of your
combined transaction) you wouldn't have this problem but if the two
transactions where to update the same row then the order would be
important and you would still need your code to deal with this case.


--
Steven Singer                                       ssinger@navtechinc.com
Dispatch Systems                            Phone:  519-747-1170 ext 282
Navtech Systems Support Inc.                AFTN:   CYYZXNSX SITA: YYZNSCR
Waterloo, Ontario                           ARINC:  YKFNSCR


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

Предыдущее
От: h8dk97@rocketmail.com (Jerry)
Дата:
Сообщение: Need two languages in the database: Russian and English
Следующее
От: Bob Kline
Дата:
Сообщение: Re: Upgrade to RedHat 9.0 broke PostgreSQL