Re: [HACKERS] Proposal for CSN based snapshots

Поиск
Список
Период
Сортировка
От Alexander Kuzmenkov
Тема Re: [HACKERS] Proposal for CSN based snapshots
Дата
Msg-id 725708e3-49f9-f26c-89bc-e8d410dcba09@postgrespro.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Proposal for CSN based snapshots  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Proposal for CSN based snapshots  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 21.06.2017 04:48, Michael Paquier wrote:
> There has not been much activity on this thread for some time, and I
> mentioned my intentions to some developers at the last PGCon. But I am
> planning to study more the work that has been done here, with as
> envisaged goal to present a patch for the first CF of PG11. Lots of
> fun ahead.

Hi Michael,

Glad to see you working on this! I've been studying this topic too. 
Attached you can find a recently rebased version of Heikki's v4 patch.
I also fixed a bug that appeared on report-receipts isolation test: 
XidIsConcurrent should report that a transaction is concurrent to ours 
when its csn equals our snapshotcsn.

There is another bug where multiple tuples with the same primary key 
appear after a pgbench read-write test. Querying pgbench_branches with 
disabled index scans, I see several tuples with the same 'bid' value. 
Usually they do not touch the index so there are no errors. But 
sometimes HOT update is not possible and it errors out with violation of 
unique constraint, which is how I noticed it. I can't reproduce it on my 
machine and have to use a 72-core one.

For now I can conclude that the oldestActiveXid is not always updated 
correctly. In TransactionIdAsyncCommitTree, just before the transaction 
sets clog status, its xid can be less than oldestActiveXid. Other 
transactions are seeing it as aborted for some time before it writes to 
clog (see TransactionIdGetCommitSeqNo). They can update a tuple it 
deleted, and that leads to duplication. Unfortunately, I didn't have 
time yet to investigate this further.
-- 

Alexander Kuzmenkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: [HACKERS] Rules on table partitions
Следующее
От: Yugo Nagata
Дата:
Сообщение: [HACKERS] pg_terminate_backend can terminate background workers andautovacuum launchers