forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbe87200
committed
Support invalidating replication slots due to horizon and wal_level
Needed for logical decoding on a standby. Slots need to be invalidated becauseof the horizon if rows required for logical decoding are removed. If theprimary's wal_level is lowered from 'logical', logical slots on the standbyneed to be invalidated.The new invalidation methods will be used in a subsequent commit.Logical slots that have been invalidated can be identified via the newpg_replication_slots.conflicting column.See6af1793 for an overall design of logical decoding on a standby.Bumps catversion for the addition of the new pg_replication_slots column.Author: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>Author: Andres Freund <andres@anarazel.de>Author: Amit Khandekar <amitdkhan.pg@gmail.com> (in an older version)Reviewed-by: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>Reviewed-by: Andres Freund <andres@anarazel.de>Reviewed-by: Robert Haas <robertmhaas@gmail.com>Reviewed-by: Fabrízio de Royes Mello <fabriziomello@gmail.com>Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://postgr.es/m/20230407075009.igg7be27ha2htkbt@awork3.anarazel.de1 parent2ed16aa commitbe87200
File tree
10 files changed
+176
-37
lines changed- doc/src/sgml
- src
- backend
- access/transam
- catalog
- replication
- logical
- include
- catalog
- replication
- test/regress/expected
10 files changed
+176
-37
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2517 | 2517 |
| |
2518 | 2518 |
| |
2519 | 2519 |
| |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
2520 | 2530 |
| |
2521 | 2531 |
| |
2522 | 2532 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6809 | 6809 |
| |
6810 | 6810 |
| |
6811 | 6811 |
| |
6812 |
| - | |
| 6812 | + | |
| 6813 | + | |
| 6814 | + | |
6813 | 6815 |
| |
6814 | 6816 |
| |
6815 | 6817 |
| |
| |||
7253 | 7255 |
| |
7254 | 7256 |
| |
7255 | 7257 |
| |
7256 |
| - | |
| 7258 | + | |
| 7259 | + | |
| 7260 | + | |
7257 | 7261 |
| |
7258 | 7262 |
| |
7259 | 7263 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1000 | 1000 |
| |
1001 | 1001 |
| |
1002 | 1002 |
| |
1003 |
| - | |
| 1003 | + | |
| 1004 | + | |
1004 | 1005 |
| |
1005 | 1006 |
| |
1006 | 1007 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
531 | 531 |
| |
532 | 532 |
| |
533 | 533 |
| |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
534 | 541 |
| |
535 | 542 |
| |
536 | 543 |
| |
|
Lines changed: 125 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1241 | 1241 |
| |
1242 | 1242 |
| |
1243 | 1243 |
| |
1244 |
| - | |
1245 |
| - | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1246 | 1296 |
| |
1247 | 1297 |
| |
1248 | 1298 |
| |
| |||
1253 | 1303 |
| |
1254 | 1304 |
| |
1255 | 1305 |
| |
1256 |
| - | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
1257 | 1310 |
| |
1258 | 1311 |
| |
1259 | 1312 |
| |
| |||
1264 | 1317 |
| |
1265 | 1318 |
| |
1266 | 1319 |
| |
| 1320 | + | |
1267 | 1321 |
| |
1268 | 1322 |
| |
1269 | 1323 |
| |
| |||
1286 | 1340 |
| |
1287 | 1341 |
| |
1288 | 1342 |
| |
1289 |
| - | |
1290 |
| - | |
| 1343 | + | |
| 1344 | + | |
1291 | 1345 |
| |
1292 |
| - | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
1293 | 1381 |
| |
1294 | 1382 |
| |
1295 | 1383 |
| |
| |||
1309 | 1397 |
| |
1310 | 1398 |
| |
1311 | 1399 |
| |
1312 |
| - | |
| 1400 | + | |
1313 | 1401 |
| |
1314 | 1402 |
| |
1315 | 1403 |
| |
1316 | 1404 |
| |
1317 | 1405 |
| |
1318 |
| - | |
| 1406 | + | |
| 1407 | + | |
1319 | 1408 |
| |
1320 | 1409 |
| |
1321 | 1410 |
| |
| |||
1349 | 1438 |
| |
1350 | 1439 |
| |
1351 | 1440 |
| |
1352 |
| - | |
1353 |
| - | |
1354 |
| - | |
1355 |
| - | |
1356 |
| - | |
1357 |
| - | |
1358 |
| - | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1359 | 1444 |
| |
1360 | 1445 |
| |
1361 | 1446 |
| |
| |||
1390 | 1475 |
| |
1391 | 1476 |
| |
1392 | 1477 |
| |
| 1478 | + | |
1393 | 1479 |
| |
1394 |
| - | |
1395 |
| - | |
1396 |
| - | |
1397 |
| - | |
1398 |
| - | |
1399 |
| - | |
1400 |
| - | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
1401 | 1483 |
| |
1402 | 1484 |
| |
1403 | 1485 |
| |
| |||
1410 | 1492 |
| |
1411 | 1493 |
| |
1412 | 1494 |
| |
1413 |
| - | |
1414 |
| - | |
| 1495 | + | |
1415 | 1496 |
| |
1416 | 1497 |
| |
1417 | 1498 |
| |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1418 | 1506 |
| |
1419 | 1507 |
| |
1420 | 1508 |
| |
1421 |
| - | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
1422 | 1512 |
| |
1423 | 1513 |
| |
1424 | 1514 |
| |
1425 | 1515 |
| |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1426 | 1523 |
| |
1427 | 1524 |
| |
1428 | 1525 |
| |
| |||
1434 | 1531 |
| |
1435 | 1532 |
| |
1436 | 1533 |
| |
1437 |
| - | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
1438 | 1537 |
| |
1439 | 1538 |
| |
1440 | 1539 |
| |
|
Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
232 | 232 |
| |
233 | 233 |
| |
234 | 234 |
| |
235 |
| - | |
| 235 | + | |
236 | 236 |
| |
237 | 237 |
| |
238 | 238 |
| |
| |||
402 | 402 |
| |
403 | 403 |
| |
404 | 404 |
| |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
405 | 415 |
| |
406 | 416 |
| |
407 | 417 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
| 60 | + | |
61 | 61 |
| |
62 | 62 |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11077 | 11077 |
| |
11078 | 11078 |
| |
11079 | 11079 |
| |
11080 |
| - | |
11081 |
| - | |
11082 |
| - | |
| 11080 | + | |
| 11081 | + | |
| 11082 | + | |
11083 | 11083 |
| |
11084 | 11084 |
| |
11085 | 11085 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 |
| |
50 | 54 |
| |
51 | 55 |
| |
| |||
226 | 230 |
| |
227 | 231 |
| |
228 | 232 |
| |
229 |
| - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
230 | 237 |
| |
231 | 238 |
| |
232 | 239 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1472 | 1472 |
| |
1473 | 1473 |
| |
1474 | 1474 |
| |
1475 |
| - | |
1476 |
| - | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
1477 | 1478 |
| |
1478 | 1479 |
| |
1479 | 1480 |
| |
|
0 commit comments
Comments
(0)