Re: BUG #15720: `executor could not find named tuplestore ABC` in AFTER DELETE trigger referencing OLD TABLE as ABC

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: jason(dot)madden(at)nextthought(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15720: `executor could not find named tuplestore ABC` in AFTER DELETE trigger referencing OLD TABLE as ABC
Date: 2019-03-29 10:12:47
Message-ID: CA+hUKGJbSd1fxUXwbV2Cvf_wE4gL9vWO3B38FB+1R_j7MzQ9hA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Mar 29, 2019 at 4:49 AM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> SQL failure calling: SELECT * FROM wip_upload_finish(...)
> ...
> Caused by: org.postgresql.util.PSQLException: ERROR: executor could not find
> named tuplestore "updated_positions"
> Where: SQL statement "UPDATE w_instances pi
> SET last_modified = NOW()
> FROM updated_positions up
> WHERE pi.object_id = up.p_instance_id"
> PL/pgSQL function wip_update_AC_trigger_func() line 24 at SQL statement
> SQL statement "
> DELETE FROM wip
> WHERE p_instance_id = (
> SELECT object_id
> FROM w_instances
> WHERE c1 = $1 and c2 = $2
> )
> "

Hi,

I haven't had time to look into this properly yet but a couple of
ideas occurred to me just from the description: I wonder if there is a
rare case of row movement in your workload (ie an update that moves a
row from one partition to another), and we have a bug in the
transition table code in that path. Then again you said you reran the
job and it worked, so unless the data that drives that jobs changed
underneath it, that might not work. Or perhaps some combination of ON
CONFLICT, partitions and transition tables is going awry... What does
wip_upload_finish() do?

--
Thomas Munro
https://enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stepan Yankevych 2019-03-29 12:37:20 Can create foreign table as parition
Previous Message PG Bug reporting form 2019-03-29 08:54:38 BUG #15723: Export fails 'worker process died unexpectedly' but no error in pg_dump