Re: BUG #14972: row duplicate on first SELECT from CTE (by JOIN/FOR UPDATE) from which UPDATE performed recently

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: dsuchka(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14972: row duplicate on first SELECT from CTE (by JOIN/FOR UPDATE) from which UPDATE performed recently
Date: 2017-12-13 20:14:52
Message-ID: CAKFQuwb2OAyOsE3m5dZT5DXz-rYF9Jj4wY5juSRHFJGdoNuyzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 13, 2017 at 12:12 PM, <dsuchka(at)gmail(dot)com> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14972
> Logged by: Evgeniy Kozlov
> Email address: dsuchka(at)gmail(dot)com
> PostgreSQL version: 9.5.5
> Operating system: gentoo, debian
> Description:
>
> Since ON CONFLICT does not work with partitions, I have designed an
> aggregation appender by hand using UPDATE (for existed rows) + INSERT (for
> new ones). Unexpectedly I got a strange result as a count of updated
> (really
> joined) rows running that function cuncurrently on 9.5.5 and 9.5.7 (9.5.2
> works correctly).
> The got value exceeds the expected result by 1
>

​Can you run this against 9.5.10 and see if it is still a problem? Its
seems the last couple of bug fix patches covered something that sounds
familiar.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-12-14 00:18:49 Re: BUG #14970: Foreign Data Wrapper for windows
Previous Message dsuchka 2017-12-13 19:12:16 BUG #14972: row duplicate on first SELECT from CTE (by JOIN/FOR UPDATE) from which UPDATE performed recently