pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Clean up side-effects of commits ab5fcf2b0 et al.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Clean up side-effects of commits ab5fcf2b0 et al.
@ 2019-04-07 16:54 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-04-07 16:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Clean up side-effects of commits ab5fcf2b0 et al.

Before those commits, partitioning-related code in the executor could
assume that ModifyTableState.resultRelInfo[] contains only leaf partitions.
However, now a fully-pruned update results in a dummy ModifyTable that
references the root partitioned table, and that breaks some stuff.

In v11, this led to an assertion or core dump in the tuple routing code.
Fix by disabling tuple routing, since we don't need that anyway.
(I chose to do that in HEAD as well for safety, even though the problem
doesn't manifest in HEAD as it stands.)

In v10, this confused ExecInitModifyTable's decision about whether it
needed to close the root table.  But we can get rid of that altogether
by being smarter about where to find the root table.

Note that since the referenced commits haven't shipped yet, this
isn't fixing any bug the field has seen.

Amit Langote, per a report from me

Discussion: https://postgr.es/m/20710.1554582479@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/159970bcadbbdefd312d75ce7ad90f19add19b40

Modified Files
--------------
src/backend/optimizer/plan/planner.c  | 2 ++
src/test/regress/expected/inherit.out | 9 +++++++++
src/test/regress/sql/inherit.sql      | 3 +++
3 files changed, 14 insertions(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Clean up side-effects of commits ab5fcf2b0 et al.
@ 2019-04-07 16:54 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-04-07 16:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Clean up side-effects of commits ab5fcf2b0 et al.

Before those commits, partitioning-related code in the executor could
assume that ModifyTableState.resultRelInfo[] contains only leaf partitions.
However, now a fully-pruned update results in a dummy ModifyTable that
references the root partitioned table, and that breaks some stuff.

In v11, this led to an assertion or core dump in the tuple routing code.
Fix by disabling tuple routing, since we don't need that anyway.
(I chose to do that in HEAD as well for safety, even though the problem
doesn't manifest in HEAD as it stands.)

In v10, this confused ExecInitModifyTable's decision about whether it
needed to close the root table.  But we can get rid of that altogether
by being smarter about where to find the root table.

Note that since the referenced commits haven't shipped yet, this
isn't fixing any bug the field has seen.

Amit Langote, per a report from me

Discussion: https://postgr.es/m/20710.1554582479@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/10e3991fad8a300ed268878ae30c96074628c1e1

Modified Files
--------------
src/backend/optimizer/plan/planner.c  | 9 +++++++++
src/test/regress/expected/inherit.out | 9 +++++++++
src/test/regress/sql/inherit.sql      | 3 +++
3 files changed, 21 insertions(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Clean up side-effects of commits ab5fcf2b0 et al.
@ 2019-04-07 16:54 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-04-07 16:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Clean up side-effects of commits ab5fcf2b0 et al.

Before those commits, partitioning-related code in the executor could
assume that ModifyTableState.resultRelInfo[] contains only leaf partitions.
However, now a fully-pruned update results in a dummy ModifyTable that
references the root partitioned table, and that breaks some stuff.

In v11, this led to an assertion or core dump in the tuple routing code.
Fix by disabling tuple routing, since we don't need that anyway.
(I chose to do that in HEAD as well for safety, even though the problem
doesn't manifest in HEAD as it stands.)

In v10, this confused ExecInitModifyTable's decision about whether it
needed to close the root table.  But we can get rid of that altogether
by being smarter about where to find the root table.

Note that since the referenced commits haven't shipped yet, this
isn't fixing any bug the field has seen.

Amit Langote, per a report from me

Discussion: https://postgr.es/m/20710.1554582479@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/67999b3547f7ee8b8c099f41ddab3001e2792202

Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 17 +++--------------
src/test/regress/expected/inherit.out  |  9 +++++++++
src/test/regress/sql/inherit.sql       |  3 +++
3 files changed, 15 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-04-07 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-07 16:54 pgsql: Clean up side-effects of commits ab5fcf2b0 et al. Tom Lane <tgl@sss.pgh.pa.us>
2019-04-07 16:54 pgsql: Clean up side-effects of commits ab5fcf2b0 et al. Tom Lane <tgl@sss.pgh.pa.us>
2019-04-07 16:54 pgsql: Clean up side-effects of commits ab5fcf2b0 et al. Tom Lane <tgl@sss.pgh.pa.us>

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