Re: [HACKERS] Issues with logical replication

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [HACKERS] Issues with logical replication
Дата
Msg-id c986f386-5ee2-9f57-d186-9b6d8f8ab8a4@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Issues with logical replication  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] Issues with logical replication
Re: [HACKERS] Issues with logical replication
Список pgsql-hackers
On 30/11/17 00:47, Andres Freund wrote:
> On 2017-11-30 00:45:44 +0100, Petr Jelinek wrote:
>> I don't understand. I mean sure the SnapBuildWaitSnapshot() can live
>> with it, but the problematic logic happens inside the
>> XactLockTableInsert() and SnapBuildWaitSnapshot() has no way of
>> detecting the situation short of reimplementing the
>> XactLockTableInsert() instead of calling it.
> 
> Right. But we fairly trivially can change that. I'm remarking on it
> because other people's, not yours, suggestions aimed at making this
> bulletproof. I just wanted to make clear that I don't think that's
> necessary at all.
> 

Okay, then I guess we are in agreement. I can confirm that the attached
fixes the issue in my tests. Using SubTransGetTopmostTransaction()
instead of SubTransGetParent() means 3 more ifs in terms of extra CPU
cost for other callers. I don't think it's worth worrying about given we
are waiting for heavyweight lock, but if we did we can just inline the
code directly into SnapBuildWaitSnapshot().

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Use of uninitialized variables in ExecFindPartition() for parentpartition without leaves (HEAD only)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] postgres_fdw: Add support for INSERT OVERRIDING clause