Re: Write skew anmalies are found in SERIALIZABLE isolation

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: Write skew anmalies are found in SERIALIZABLE isolation
Дата
Msg-id db8a32be-e3e3-a01f-b03c-a812481ac63d@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Write skew anmalies are found in SERIALIZABLE isolation  ("张舒燕" <51184501183@stu.ecnu.edu.cn>)
Список pgsql-bugs
On 04.10.2019 4:36, 张舒燕 wrote:
We have tested versions of 9.4.0, 9.6.0, 10.0, 11.0 and 11.5 and found the Bug on all of them.

We have wrong statements in the last email.
"If each transaction only read one item with secondary index and write another item with primary index, write skew anomalies are more ( -> less) likely to occur."
"At last, we run the same join SQL, and more ( -> less) anomalies can be found. The corresponding test program is Test2.java."
There are less anomalies can be found in the second situation using Test2.java.

And some mistakes in our test programs have been fixed.

Best regards ,
Shuyan Zhang, ECNU

I do not think that this problem is somehow related with "write skew anomalies".
The type of "col" is decimal, but you are extracting it as "double", making conversion and loosing precision.
Then you perform some manipulations using Java BigDecimal class, convert result to string (which also does some rounding) and subtract this value from the column.
As a result of this conversions  your original  assumption that (x+y)*0.9 < (x+y) may be wrong.
Please try to reproduce the problem using integer type  and I am almost sure that you will not able to get this anomalies.


 
------------------ Original ------------------
Date:  Fri, Oct 4, 2019 05:05 AM
Subject:  Re: Write skew anmalies are found in SERIALIZABLE isolation
 
On Thu, Oct 3, 2019 at 9:18 AM 张舒燕 <51184501183@stu.ecnu.edu.cn> wrote:
> When we set the isolation level to SERIALIZABLE, we observed some wirte skew anmalies.

What version of PostgreSQL did you test? Does this bug affect all versions?

--
Peter Geoghegan

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16037: Assertion fails in varbit_out
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: BUG #16035: STATEMENT_TIMEOUT not working when we have singlequote usage inside CTE which is used in inner sql