forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1c60e40
committed
Fix negative bitmapset member not allowed error in logical replication
This happens when we add a replica identity column on a subscriberthat does not yet exist on the publisher, according to the mappingmaintained by the subscriber. Code that checks whether the targetrelation on the subscriber is updatable would check the replicaidentity attribute bitmap with a column number -1, which would resultin an error. To fix, skip such columns in the bitmap lookup andconsider the relation not updatable. The result is consistent withthe rule that the replica identity columns on the subscriber must be asubset of those on the publisher, since if the column doesn't exist onthe publisher, the column set on the subscriber can't be a subset.Reported-by: Tim Clarke <tim.clarke@minerva.info>Analyzed-by: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>Discussion:https://www.postgresql.org/message-id/flat/a9139c29-7ddd-973b-aa7f-71fed9c38d75%40minerva.info1 parent943b447 commit1c60e40
File tree
2 files changed
+37
-3
lines changed- src
- backend/replication/logical
- test/subscription/t
2 files changed
+37
-3
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
343 |
| - | |
| 343 | + | |
| 344 | + | |
344 | 345 |
| |
345 | 346 |
| |
346 | 347 |
| |
|
Lines changed: 35 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
| 6 | + | |
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
91 | 124 |
| |
92 | 125 |
|
0 commit comments
Comments
(0)