pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix bogus logic for reporting which hash partition conflicts. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix bogus logic for reporting which hash partition conflicts. @ 2021-06-29 18:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2021-06-29 18:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix bogus logic for reporting which hash partition conflicts. Commit efbfb6424 added logic for reporting exactly which existing partition conflicts when complaining that a new hash partition's modulus isn't compatible with the existing ones. However, it misunderstood the partitioning data structure, and would select the wrong partition in some cases, or crash outright due to fetching a bogus table OID in other cases. Per bug #17076 from Alexander Lakhin. Fix by Amit Langote; some further work on the code comments by me. Discussion: https://postgr.es/m/17076-89a16ae835d329b9@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/dd2364ced98553e0217bfe8f621cd4b0970db74a Modified Files -------------- src/backend/partitioning/partbounds.c | 26 ++++++++++++++++++-------- src/test/regress/expected/create_table.out | 10 ++++++++-- src/test/regress/sql/create_table.sql | 3 +++ 3 files changed, 29 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix bogus logic for reporting which hash partition conflicts. @ 2021-06-29 18:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2021-06-29 18:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix bogus logic for reporting which hash partition conflicts. Commit efbfb6424 added logic for reporting exactly which existing partition conflicts when complaining that a new hash partition's modulus isn't compatible with the existing ones. However, it misunderstood the partitioning data structure, and would select the wrong partition in some cases, or crash outright due to fetching a bogus table OID in other cases. Per bug #17076 from Alexander Lakhin. Fix by Amit Langote; some further work on the code comments by me. Discussion: https://postgr.es/m/17076-89a16ae835d329b9@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f8b51464c265696c1eab1c896bddc797beb9a13c Modified Files -------------- src/backend/partitioning/partbounds.c | 26 ++++++++++++++++++-------- src/test/regress/expected/create_table.out | 10 ++++++++-- src/test/regress/sql/create_table.sql | 3 +++ 3 files changed, 29 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-06-29 18:34 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-06-29 18:34 pgsql: Fix bogus logic for reporting which hash partition conflicts. Tom Lane <tgl@sss.pgh.pa.us> 2021-06-29 18:34 pgsql: Fix bogus logic for reporting which hash partition conflicts. 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