Skip to content
Snippets Groups Projects
Commit 6619d488 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Add a comment.

parent 40292a7a
No related branches found
No related tags found
No related merge requests found
......@@ -1433,7 +1433,14 @@ write_to_disk(struct recovery_state *r, struct wal_write_request *req)
goto fail;
}
}
/*
* Close the file *after* we write the first record
* into the new WAL, since this is when replication
* relays get an inotify alarm (when we close the file),
* and try to reopen the next WAL. In other words,
* make sure that replication realys try to open the
* next WAL only when it exists.
*/
if (wal_to_close != NULL) {
if (log_io_close(&wal_to_close) != 0)
goto fail;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment