forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb05fe7b
committed
Review logical replication tablesync code
Most importantly, remove optimization in LogicalRepSyncTableStart thatskips the normal walrcv_startstreaming/endstreaming dance. Theoptimization is not critically important for production uses anyway,since it only fires in cases with no activity, and saves anuninteresting amount of work even then. Critically, it obscures bugs byhiding the interesting code path from test cases.Also: in GetSubscriptionRelState, remove pointless relation open; accesspg_subscription_rel->srsubstate with GETSTRUCT as is typical rather thanSysCacheGetAttr; remove unused 'missing_ok' argument.In wait_for_relation_state_change, use explicit catalog snapshotinvalidation rather than obscurely (and expensively) throughGetLatestSnapshot.In various places: sprinkle comments more liberally and rewrite a numberof them. Other cosmetic code improvements.No backpatch, since no bug is being fixed here.Author: Álvaro Herrera <alvherre@alvh.no-ip.org>Reviewed-by: Petr Jelínek <petr.jelinek@2ndquadrant.com>Discussion:https://postgr.es/m/20201010190637.GA5774@alvherre.pgsql1 parentc5b097f commitb05fe7b
File tree
5 files changed
+131
-178
lines changed- src
- backend
- catalog
- replication/logical
- include/catalog
5 files changed
+131
-178
lines changedLines changed: 7 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
328 | 328 |
| |
329 | 329 |
| |
330 | 330 |
| |
331 |
| - | |
| 331 | + | |
332 | 332 |
| |
333 | 333 |
| |
334 |
| - | |
335 |
| - | |
| 334 | + | |
336 | 335 |
| |
337 |
| - | |
338 | 336 |
| |
339 | 337 |
| |
340 | 338 |
| |
341 | 339 |
| |
342 | 340 |
| |
343 |
| - | |
344 |
| - | |
345 | 341 |
| |
346 | 342 |
| |
347 | 343 |
| |
348 | 344 |
| |
349 | 345 |
| |
350 | 346 |
| |
351 | 347 |
| |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
| 348 | + | |
| 349 | + | |
361 | 350 |
| |
362 | 351 |
| |
363 | 352 |
| |
364 |
| - | |
365 |
| - | |
366 |
| - | |
367 |
| - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
368 | 356 |
| |
369 | 357 |
| |
370 | 358 |
| |
| |||
374 | 362 |
| |
375 | 363 |
| |
376 | 364 |
| |
377 |
| - | |
378 | 365 |
| |
379 | 366 |
| |
380 | 367 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
437 | 437 |
| |
438 | 438 |
| |
439 | 439 |
| |
440 |
| - | |
441 |
| - | |
| 440 | + | |
442 | 441 |
| |
443 | 442 |
| |
444 | 443 |
| |
|
0 commit comments
Comments
(0)