pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
DROP STATISTICS results in "ERROR: tuple concurrently updated"
3+ messages / 3 participants
[nested] [flat]

* DROP STATISTICS results in "ERROR: tuple concurrently updated"
@ 2019-07-23 12:01  Manuel Rigger <rigger.manuel@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Manuel Rigger @ 2019-07-23 12:01 UTC (permalink / raw)
  To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

Hi everyone,

When running multiple threads that operate on distinct databases, a
"DROP STATISTICS" sometimes results in an error "ERROR: tuple
concurrently updated". Would it be useful to make this error
reproducible, or could this be expected, similar to the VACUUM
deadlocks [1]?

Best,
Manuel

[1] https://www.postgresql.org/message-id/CA%2Bu7OA6pL%2B7Xm_NXHLenxffe3tCr3gTamVdr7zPjcWqW0RFM-A%40mail...





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: DROP STATISTICS results in "ERROR: tuple concurrently updated"
@ 2019-07-23 18:14  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Manuel Rigger <rigger.manuel@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2019-07-23 18:14 UTC (permalink / raw)
  To: Manuel Rigger <rigger.manuel@gmail.com>; +Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

Manuel Rigger <rigger.manuel@gmail.com> writes:
> When running multiple threads that operate on distinct databases, a
> "DROP STATISTICS" sometimes results in an error "ERROR: tuple
> concurrently updated". Would it be useful to make this error
> reproducible, or could this be expected, similar to the VACUUM
> deadlocks [1]?

I think it'd be worth running to ground, at least.  One could imagine that
the error is coming from one session trying to delete a statistics row
that some other session has updated-and-not-yet-committed; but then the
question is why there's not sufficient interlocking to avoid that.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: DROP STATISTICS results in "ERROR: tuple concurrently updated"
@ 2019-07-23 20:00  Andres Freund <andres@anarazel.de>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2019-07-23 20:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Manuel Rigger <rigger.manuel@gmail.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

Hi,

On 2019-07-23 14:14:56 -0400, Tom Lane wrote:
> Manuel Rigger <rigger.manuel@gmail.com> writes:
> > When running multiple threads that operate on distinct databases, a
> > "DROP STATISTICS" sometimes results in an error "ERROR: tuple
> > concurrently updated".

When you say "distinct databases", do you mean that each thread is on a
separate database, and that there's no actual concurrent access?


> I think it'd be worth running to ground, at least.  One could imagine that
> the error is coming from one session trying to delete a statistics row
> that some other session has updated-and-not-yet-committed; but then the
> question is why there's not sufficient interlocking to avoid that.

For a second I thought it might be this bug:
https://www.postgresql.org/message-id/20190618231233.GA27470%40telsasoft.com

but it doesn't actually look like it's necessarily related. But it did
remind me that we ought to fix that, and that we didn't yet have an open
item...

Greetings,

Andres Freund





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-07-23 20:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 12:01 DROP STATISTICS results in "ERROR: tuple concurrently updated" Manuel Rigger <rigger.manuel@gmail.com>
2019-07-23 18:14 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-07-23 20:00   ` Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox