forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit414d29a
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 parent0eede96 commit414d29a
1 file changed
+17
-3
lines changedLines changed: 17 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2151 | 2151 |
| |
2152 | 2152 |
| |
2153 | 2153 |
| |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
2154 | 2163 |
| |
2155 | 2164 |
| |
2156 | 2165 |
| |
| |||
2204 | 2213 |
| |
2205 | 2214 |
| |
2206 | 2215 |
| |
| 2216 | + | |
2207 | 2217 |
| |
2208 | 2218 |
| |
2209 | 2219 |
| |
| |||
2289 | 2299 |
| |
2290 | 2300 |
| |
2291 | 2301 |
| |
2292 |
| - | |
2293 | 2302 |
| |
2294 | 2303 |
| |
2295 | 2304 |
| |
2296 | 2305 |
| |
2297 | 2306 |
| |
2298 | 2307 |
| |
2299 | 2308 |
| |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
2300 | 2315 |
| |
2301 | 2316 |
| |
2302 | 2317 |
| |
| |||
2309 | 2324 |
| |
2310 | 2325 |
| |
2311 | 2326 |
| |
2312 |
| - | |
2313 | 2327 |
| |
2314 | 2328 |
| |
2315 |
| - | |
| 2329 | + | |
2316 | 2330 |
| |
2317 | 2331 |
| |
2318 | 2332 |
| |
|
0 commit comments
Comments
(0)