* SyncPreCheckpoint() -- Do pre-checkpoint work * * To distinguish unlink requests that arrived before this checkpoint * started from those that arrived during the checkpoint, we use a cycle * counter similar to the one we use for fsync requests. That cycle * counter is incremented here. * * This must be called *before* the checkpoint REDO point is determined. * That ensures that we won't
| 193 | * that the checkpoint will be completed. |
| 194 | */ |
| 195 | void |
| 196 | SyncPreCheckpoint(void) |
| 197 | { |
| 198 | /* |
| 199 | * Operations such as DROP TABLESPACE assume that the next checkpoint will |
| 200 | * process all recently forwarded unlink requests, but if they aren't |
| 201 | * absorbed prior to advancing the cycle counter, they won't be processed |
| 202 | * until a future checkpoint. The following absorb ensures that any |
| 203 | * unlink requests forwarded before the checkpoint began will be processed |
| 204 | * in the current checkpoint. |
| 205 | */ |
| 206 | AbsorbSyncRequests(); |
| 207 | |
| 208 | /* |
| 209 | * Any unlink requests arriving after this point will be assigned the next |
| 210 | * cycle counter, and won't be unlinked until next checkpoint. |
| 211 | */ |
| 212 | checkpoint_cycle_ctr++; |
| 213 | } |
| 214 | |
| 215 | /* |
| 216 | * SyncPostCheckpoint() -- Do post-checkpoint work |
no test coverage detected