pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andy Fan <zhihui.fan1213@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: FailedAssertion("pd_idx == pinfo->nparts", File: "execPartition.c", Line: 1689)
Date: Thu, 6 Aug 2020 23:05:55 -0500
Message-ID: <20200807040555.GD20473@telsasoft.com> (raw)
In-Reply-To: <CA+HiwqGr=vPwPfwKcc+biEc5LxhLE4fWYnBGmzv-vUNq+_fp+Q@mail.gmail.com>
References: <2528807.1596648630@sss.pgh.pa.us>
	<CA+TgmoYMqqqHaOpfMYs8R6VJekykfRABCD=o4ovN2eUz-efYMA@mail.gmail.com>
	<2550497.1596651719@sss.pgh.pa.us>
	<CAKU4AWpEMxre9zDs-Odx7PnYd7tW3MiAyYBaP=9QrjuD7ps=MQ@mail.gmail.com>
	<2598266.1596686548@sss.pgh.pa.us>
	<CAKU4AWo0wDDabURj9FQoJU6p6yczy8fk48gSvTTdq1kYPAcWoQ@mail.gmail.com>
	<2626504.1596724930@sss.pgh.pa.us>
	<CAKU4AWoyeg=K9HXhtubnVwBZnyfVouJw+5LwCS7akyh1BD0-QA@mail.gmail.com>
	<2685059.1596760353@sss.pgh.pa.us>
	<CA+HiwqGr=vPwPfwKcc+biEc5LxhLE4fWYnBGmzv-vUNq+_fp+Q@mail.gmail.com>

On Fri, Aug 07, 2020 at 12:16:11PM +0900, Amit Langote wrote:
> Curiously, Justin mentioned upthread that the crash occurred during
> BIND of a prepared query, so it better had been that a custom plan was
> being executed, because a generic one based on fewer partitions would
> be thrown away due to A.I.M. invoked during AcquireExecutorLocks().

Well this statement should only be executed once, and should be using
PQexecParams and not PQexecPrepared (pygresql: pg.DB().query_prepared()).

(gdb) p portal->name
$30 = 0xf03238 ""

(gdb) p portal->prepStmtName 
$31 = 0x0

(gdb) p *portal->cplan
$24 = {magic = 953717834, stmt_list = 0x682ec38, is_oneshot = false, is_saved = true, is_valid = true, planRoleId = 16554, dependsOnRole = false, saved_xmin = 0, generation = 1, refcount = 1, context = 0x682dfd0}

I'm not sure why is_oneshot=false, though...

-- 
Justin





view thread (31+ messages)  latest in thread

Message-ID: <20200807040555.GD20473@telsasoft.com>
Permalink:  ../20200807040555.GD20473@telsasoft.com/
Also on:    postgresql.org/message-id/20200807040555.GD20473@telsasoft.com

 · 

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: pryzby@telsasoft.com, amitlangote09@gmail.com, tgl@sss.pgh.pa.us, zhihui.fan1213@gmail.com, robertmhaas@gmail.com
  Subject: Re: FailedAssertion("pd_idx == pinfo->nparts", File: "execPartition.c", Line: 1689)
  In-Reply-To: <20200807040555.GD20473@telsasoft.com>

* 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