- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit96f6a0c
committed
Remove files signaling a standby promotion request at postmaster startup
This commit makes postmaster forcibly remove the files signalinga standby promotion request. Otherwise, the existence of those filescan trigger a promotion too early, whether a user wants that or not.This removal of files is usually unnecessary because they can existonly during a few moments during a standby promotion. Howeverthere is a race condition: if pg_ctl promote is executed and createsthe files during a promotion, the files can stay around even afterthe server is brought up to new master. Then, if new standby startsby using the backup taken from that master, the files can existat the server startup and should be removed in order to avoidan unexpected promotion.Back-patch to 9.1 where promote signal file was introduced.Problem reported by Feike Steenbergen.Original patch by Michael Paquier, modified by me.Discussion: 20150528100705.4686.91426@wrigleys.postgresql.org1 parentc3e0ddd commit96f6a0c
File tree
3 files changed
+32
-0
lines changed- src
- backend
- access/transam
- postmaster
- include/access
3 files changed
+32
-0
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11587 | 11587 |
| |
11588 | 11588 |
| |
11589 | 11589 |
| |
| 11590 | + | |
| 11591 | + | |
| 11592 | + | |
| 11593 | + | |
| 11594 | + | |
| 11595 | + | |
| 11596 | + | |
| 11597 | + | |
| 11598 | + | |
| 11599 | + | |
11590 | 11600 |
| |
11591 | 11601 |
| |
11592 | 11602 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1175 | 1175 |
| |
1176 | 1176 |
| |
1177 | 1177 |
| |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1178 | 1199 |
| |
1179 | 1200 |
| |
1180 | 1201 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
| 264 | + | |
264 | 265 |
| |
265 | 266 |
| |
266 | 267 |
| |
|
0 commit comments
Comments
(0)