Re: Hot Standby and prepared transactions
От | Hiroyuki Yamada |
---|---|
Тема | Re: Hot Standby and prepared transactions |
Дата | |
Msg-id | 200912171055.AA00174@silver.kokolink.net обсуждение исходный текст |
Ответ на | Re: Hot Standby and prepared transactions (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: Hot Standby and prepared transactions
Re: Hot Standby and prepared transactions |
Список | pgsql-hackers |
>On Wed, 2009-12-16 at 19:35 +0900, Hiroyuki Yamada wrote: > >> * There is a window beween gathering lock information in GetRunningTransactionLocks() >> and writing WAL in LogAccessExclusiveLocks(). >> * In current lock redo algorithm, locks are released when the transaction holding the lock >> are commited or aborted. >> >> ... then what happens if any transaction holding ACCESS EXCLUSIVE lock commits in the >> window ? > >Yes, was a problem in that code. Fixed in git. > >We were doing it for prepared transactions but not for normal xacts. >I will look again at that code. > >Thanks very much for reading the code. Any more?!? > Well, I've read some more and have a question. The implementation assumes that transactions write COMMIT/ABORT WAL at the end of them, while it does not seem to write ABORT WAL in immediate shutdown. So, 1. acquire ACCESS EXCLUSIVE lock in table A in xact 1 2. execute immediate shutdown of the active node 3. restart it 4. acquire ACCESS EXCLUSIVE lock in table A in xact 2 ...then, duplicate lock acquisition by two diffrent transactions can occur in the standby node. Am I missing something ? Or is this already reported ? regards, -- Hiroyuki YAMADA Kokolink Corporation yamada@kokolink.net
В списке pgsql-hackers по дате отправления: