Commit a817326
authored
Refrain from preventing changes that are not really changes. (#570)
When a user runs the same command twice in a row, such as with the
following, make it so that the second time just works. It didn't because we
failed to observe that setting the candidate priority to zero could be a
non-changer if that's already the current value of the setting.
pg_autoctl set node candidate-priority --name node3 0
We could also skip the operation entirely, but this has two drawbacks:
- the client implementation would then need to decide if it has to wait
for the apply-settings steps to happen or immediately return,
- more importantly, if there's a problem with synchronous_standby_names it
might be good that setting a value to its current setting, thus applying
no changes, forces a cache invalidation of the primary's setup.1 parent 2f52925 commit a817326
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1722 | 1722 | | |
1723 | 1723 | | |
1724 | 1724 | | |
1725 | | - | |
| 1725 | + | |
| 1726 | + | |
1726 | 1727 | | |
1727 | 1728 | | |
1728 | 1729 | | |
| |||
1748 | 1749 | | |
1749 | 1750 | | |
1750 | 1751 | | |
1751 | | - | |
| 1752 | + | |
1752 | 1753 | | |
1753 | 1754 | | |
1754 | 1755 | | |
| |||
1862 | 1863 | | |
1863 | 1864 | | |
1864 | 1865 | | |
1865 | | - | |
| 1866 | + | |
| 1867 | + | |
1866 | 1868 | | |
1867 | 1869 | | |
1868 | 1870 | | |
| |||
0 commit comments