forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbe541ef
committed
Defend against unsupported partition relkind in logical replication worker.
Since partitions can be foreign tables not only plain tables, butlogical replication only supports plain tables, we'd better check therelkind of a partition after we find it. (There was some discussionof checking this when adding a partitioned table to a subscription;but that would be inadequate since the troublesome partition could beadded later.) Without this, the situation leads to a segfault orassertion failure.In passing, add a separate variable for the target Relation ofa cross-partition UPDATE; reusing partrel seemed mighty confusingand error-prone.Shi Yu and Tom Lane, per report from Ilya Gladyshev. Back-patchto v13 where logical replication into partitioned tables becamea thing.Discussion:https://postgr.es/m/6b93e3748ba43298694f376ca8797279d7945e29.camel@gmail.com1 parent26ee7fb commitbe541ef
1 file changed
+17
-3
lines changedLines changed: 17 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2176 | 2176 |
| |
2177 | 2177 |
| |
2178 | 2178 |
| |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
2179 | 2188 |
| |
2180 | 2189 |
| |
2181 | 2190 |
| |
| |||
2229 | 2238 |
| |
2230 | 2239 |
| |
2231 | 2240 |
| |
| 2241 | + | |
2232 | 2242 |
| |
2233 | 2243 |
| |
2234 | 2244 |
| |
| |||
2314 | 2324 |
| |
2315 | 2325 |
| |
2316 | 2326 |
| |
2317 |
| - | |
2318 | 2327 |
| |
2319 | 2328 |
| |
2320 | 2329 |
| |
2321 | 2330 |
| |
2322 | 2331 |
| |
2323 | 2332 |
| |
2324 | 2333 |
| |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
2325 | 2340 |
| |
2326 | 2341 |
| |
2327 | 2342 |
| |
| |||
2334 | 2349 |
| |
2335 | 2350 |
| |
2336 | 2351 |
| |
2337 |
| - | |
2338 | 2352 |
| |
2339 | 2353 |
| |
2340 |
| - | |
| 2354 | + | |
2341 | 2355 |
| |
2342 | 2356 |
| |
2343 | 2357 |
| |
|
0 commit comments
Comments
(0)