pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Ibrar Ahmed <ibrar.ahmad@gmail.com>
Cc: Arne Roland <A.Roland@index.de>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Rahila Syed <rahilasyed90@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Subject: Re: a misbehavior of partition row movement (?)
Date: Wed, 19 Jan 2022 06:25:58 -0300
Message-ID: <202201190925.rrnex5zf56vz@alvherre.pgsql> (raw)
In-Reply-To: <CA+HiwqFuAi7zCEC_7dhOLoEQ_HTq4DOyp9-NKzfZVNRdFHSs3w@mail.gmail.com>

On 2022-Jan-19, Amit Langote wrote:

> BTW, your tweaks patch added this:
> 
> + *     *inserted_tuple is the tuple that's effectively inserted;
> + *     *inserted_destrel is the relation where it was inserted.
> + *     These are only set on success.  FIXME -- see what happens on
> the "do nothing" cases.
> 
> If by "do nothing cases" you mean INSERT ON CONFLICT ... DO NOTHING,
> then I don't think it matters, because the caller in that case would
> be ExecModifyTable() which doesn't care about inserted_tuple and
> inserted_destrel.

No, I meant a FOR EACH ROW trigger that does RETURN NULL to "abort" the
insertion.  IIRC in non-partitioned cases it is possibly to break
referential integrity by using those.  What I was wondering is whether
you can make this new code crash.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/
"I can see support will not be a problem.  10 out of 10."    (Simon Wittber)
      (http://archives.postgresql.org/pgsql-general/2004-12/msg00159.php)





view thread (73+ messages)  latest in thread

Message-ID: <202201190925.rrnex5zf56vz@alvherre.pgsql>
Permalink:  ../202201190925.rrnex5zf56vz@alvherre.pgsql/
Also on:    postgresql.org/message-id/202201190925.rrnex5zf56vz@alvherre.pgsql

 · 

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-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, amitlangote09@gmail.com, tgl@sss.pgh.pa.us, andrew@dunslane.net, ibrar.ahmad@gmail.com, A.Roland@index.de, david.g.johnston@gmail.com, sawada.mshk@gmail.com, peter.eisentraut@enterprisedb.com, rahilasyed90@gmail.com, tomas.vondra@2ndquadrant.com
  Subject: Re: a misbehavior of partition row movement (?)
  In-Reply-To: <202201190925.rrnex5zf56vz@alvherre.pgsql>

* 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