aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-11-02 12:29:39 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-11-02 12:29:39 -0400
commit414d29a826f3a63fabae5e9ac2eb5b17f03787d8 (patch)
tree067df60fb35dab54ea7b4adba86b7eab5e946cec /src/backend/commands/dbcommands.c
parent0eede9625659d47a9b3fb1292f71c8b16667326b (diff)
downloadpostgresql-414d29a826f3a63fabae5e9ac2eb5b17f03787d8.tar.gz
postgresql-414d29a826f3a63fabae5e9ac2eb5b17f03787d8.zip
Defend against unsupported partition relkind in logical replication worker.
Since partitions can be foreign tables not only plain tables, but logical replication only supports plain tables, we'd better check the relkind of a partition after we find it. (There was some discussion of checking this when adding a partitioned table to a subscription; but that would be inadequate since the troublesome partition could be added later.) Without this, the situation leads to a segfault or assertion failure. In passing, add a separate variable for the target Relation of a cross-partition UPDATE; reusing partrel seemed mighty confusing and error-prone. Shi Yu and Tom Lane, per report from Ilya Gladyshev. Back-patch to v13 where logical replication into partitioned tables became a thing. Discussion: https://postgr.es/m/6b93e3748ba43298694f376ca8797279d7945e29.camel@gmail.com
Diffstat (limited to 'src/backend/commands/dbcommands.c')
0 files changed, 0 insertions, 0 deletions