Re: BUG #14150: Attempted to delete invisible tuple

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: virendra(at)idyllic-software(dot)com
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Peter Tripp <peter(at)chartio(dot)com>
Subject: Re: BUG #14150: Attempted to delete invisible tuple
Date: 2016-06-13 20:45:53
Message-ID: CAM3SWZTZGRwo40ONo8g+ePmyjjhTgkYockn_iRY4PX9Wfz045Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, May 19, 2016 at 5:33 AM, <virendra(at)idyllic-software(dot)com> wrote:
> ## We have system where we perform lot of insert and update (no delete) and
> some time upsert query.
>
> ## Error the ruby pg library report
> PG::ObjectNotInPrerequisiteState: ERROR: attempted to delete invisible
> tuple

I am having difficulty isolating this bug, although I have some
high-level theories [1]. (I won't have much time to work on it this
week, but want to get ahead of that.)

Any further details you can provide may be useful. For example:

* How many clients are running when problems are seen?

* How frequently can you see a problem? Is it easy for you to
reproduce the problem, or is this something you only see every once in
a long while?

* Do you notice any correlation between this issue and other things?
For example, do you tend to notice that other queries are running at
the same time? What do your logs look like around the time that the
error is raised?

Ideally, you'd be able to build Postgres yourself, with the attached
patch applied (the 9.5 release branch should be used, of course). This
will provoke a hard crash in the event of hitting this problem. You
can set things up such that this produces a core dump for further
debugging here (for the directly affected backend):

https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD

I'm particularly interested in seeing a backtrace from the core dump.
That should make the general nature of the problem clear.

Thanks

[1] https://www.postgresql.org/message-id/CAM3SWZSf_R5g4w_md-etXyUdUtzYzWofFZ9qOzPOhbnrBUHz8A@mail.gmail.com
--
Peter Geoghegan

Attachment Content-Type Size
delete-invisible-panic.patch text/x-patch 439 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2016-06-13 21:58:58 Re: BUG #14150: Attempted to delete invisible tuple
Previous Message Eric Worden 2016-06-13 20:32:52 Re: Fwd: BUG #14181: pg_upgrade: operator family "btree_hstore_ops" does not exist