postgres/src
Michael Paquier 2e577c9446 Remove assertion for ALTER TABLE .. DETACH PARTITION CONCURRENTLY
One code path related to this flavor of ALTER TABLE was checking that
the relation to detach has to be a normal table or a partitioned table,
which would fail if using the command with a different relation kind.

Views, sequences and materialized views cannot be part of a partition
tree, so these would cause the command to fail anyway, but the assertion
was triggered.  Foreign tables can be part of a partition tree, and
again the assertion would have failed.  The simplest solution is just to
remove this assertion, so as we get the same failure as the
non-concurrent code path.

While on it, add a regression test in postgres_fdw for the concurrent
partition detach of a foreign table, as per a suggestion from Alexander
Lakhin.

Issue introduced in 71f4c8c.

Reported-by: Alexander Lakhin
Author: Michael Paquier, Alexander Lakhin
Reviewed-by: Peter Eisentraut, Kyotaro Horiguchi
Discussion: https://postgr.es/m/17339-a9e09aaf38a3457a@postgresql.org
Backpatch-through: 14
2021-12-22 15:38:00 +09:00
..
backend Remove assertion for ALTER TABLE .. DETACH PARTITION CONCURRENTLY 2021-12-22 15:38:00 +09:00
bin Add help & tab-complete support for psql's \getenv. 2021-12-21 16:18:41 -05:00
common Add fast path for validating UTF-8 text 2021-12-20 10:07:29 -04:00
fe_utils Rethink pg_dump's handling of object ACLs. 2021-12-06 12:39:45 -05:00
include Move index vacuum routines to vacuum.c. 2021-12-22 07:55:14 +05:30
interfaces Remove dynamic translation of regression test scripts, step 2. 2021-12-20 14:15:52 -05:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Add missing EmitWarningsOnPlaceholders() calls. 2021-12-21 12:12:24 -05:00
port Check for STATUS_DELETE_PENDING on Windows. 2021-12-10 16:19:43 +13:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Add missing EmitWarningsOnPlaceholders() calls. 2021-12-21 12:12:24 -05:00
timezone Update time zone data files to tzdata release 2021e. 2021-10-29 11:38:18 -04:00
tools Move index vacuum routines to vacuum.c. 2021-12-22 07:55:14 +05:30
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Add support for LZ4 compression in pg_receivewal 2021-11-05 11:33:25 +09:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00