pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Karsten Hilbert <Karsten.Hilbert@gmx.net>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: backend crash on DELETE, reproducible locally
Date: Fri, 02 Nov 2018 23:56:58 -0400
Message-ID: <32192.1541217418@sss.pgh.pa.us> (raw)
In-Reply-To: <20181101160007.GJ2954@hermes.hilbert.loc>
References: <20181101152723.zq2dtcgntmcmr4br@alvherre.pgsql>
	<18072.1541087036@sss.pgh.pa.us>
	<20181101160007.GJ2954@hermes.hilbert.loc>

Karsten Hilbert <Karsten.Hilbert@gmx.net> writes:
> On Thu, Nov 01, 2018 at 11:43:56AM -0400, Tom Lane wrote:
>> Yeah, apparently we've passed a null OLD tuple to an RI_FKey_cascade_del
>> trigger, which surely shouldn't happen.  It'd be interesting to look at
>> the set of triggers on this table.  I don't entirely trust psql's \d
>> to show us reality if there's something screwed up about the triggers,
>> so in addition to \d output, could we see
>> select * from pg_trigger where tgrelid  = 'ref.auto_hint'::regclass;

> [ pretty normal-looking trigger entries ]

I was feeling baffled about this, but it suddenly occurs to me that maybe
the bug fixed in 040a1df61/372102b81 explains this.  If the particular
tuple you're trying to delete predates the last ALTER TABLE ADD COLUMN
operation on the table, then this bug would result in t_self getting
set to "invalid", which'd cause AfterTriggerSaveEvent to save "ate_ctid1"
as "invalid", which'd lead to a null tuple getting passed when the trigger
eventually gets invoked.

			regards, tom lane




view thread (38+ messages)  latest in thread

Message-ID: <32192.1541217418@sss.pgh.pa.us>
Permalink:  ../32192.1541217418@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/32192.1541217418@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Karsten.Hilbert@gmx.net, alvherre@2ndquadrant.com, pgsql-general@lists.postgresql.org
  Subject: Re: backend crash on DELETE, reproducible locally
  In-Reply-To: <32192.1541217418@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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