Re: BUG #17395: Assert failed on merge join when foreign range partition contains out-of-range value

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-02-05T15:50:57Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> The following query:
> [ foreign partition that doesn't contain the expected data ]
> causes an assertion failure with the following stack:

Hm.  I suppose we have to reduce that assert to an actual runtime
test.  More generally, though, it seems like the documentation is
not nearly clear enough that it's on the user's head to make sure
that a foreign partition's contents meet the partition constraint.
Sec. 5.11.2 punts the matter to the CREATE FOREIGN TABLE man page,
which is okay, but CREATE FOREIGN TABLE doesn't lay it out with
any degree of clarity either.

			regards, tom lane



Commits

  1. Doc: be clearer that foreign-table partitions need user-added constraints.

  2. Test, don't just Assert, that mergejoin's inputs are in order.