aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/functioncmds.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
commita5b7821fc908b50ace1cdc3b972da08a265a81bd (patch)
tree1c7756209b3843d6375a61fcf0d9ac6d17dade2c /src/backend/commands/functioncmds.c
parent2896aa98ef569d99ea5b27cd6e7a2a789c14fd0a (diff)
downloadpostgresql-a5b7821fc908b50ace1cdc3b972da08a265a81bd.tar.gz
postgresql-a5b7821fc908b50ace1cdc3b972da08a265a81bd.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/functioncmds.c')
0 files changed, 0 insertions, 0 deletions