Inconsistent behavior in serializable snapshot

Поиск
Список
Период
Сортировка
От Kuntal Ghosh
Тема Inconsistent behavior in serializable snapshot
Дата
Msg-id CAGz5QCK3MVNjS+EUPRVP_XvJdh79Mu-EsDn2LBHNzGMUdjtjHw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Inconsistent behavior in serializable snapshot  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Список pgsql-hackers
Hello hackers,

While working on serializable transaction isolation, I've noticed some
strange behavior in the first permutation mentioned in
isolation/specs/read-only-anomaly-2.spec file.

setup
{
    CREATE TABLE bank_account (id TEXT PRIMARY KEY, balance DECIMAL NOT NULL);
    INSERT INTO bank_account (id, balance) VALUES ('X', 0), ('Y', 0);
}

# without s3, s1 and s2 commit
permutation "s2rx" "s2ry" "s1ry" "s1wy" "s1c" "s2wx" "s2c" "s3c"

Here, we can see a serial order T1 <- T2 without any conflict.
However, if I perform "VACUUM FREEZE bank_account" after the setup
step, s2wx throws a conflict error:
ERROR:  could not serialize access due to read/write dependencies
among transactions
DETAIL:  Reason code: Canceled on identification as a pivot, during write.
HINT:  The transaction might succeed if retried.

Is this an expected behavior?
-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [bug fix] pg_rewind creates corrupt WAL files, and the standbycannot catch up the primary
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: [bug fix] pg_rewind creates corrupt WAL files, and the standbycannot catch up the primary