mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 21:12:55 +00:00
tests: Make neon_xlogflush() flush all WAL, if you omit the LSN arg (#8215)
This makes it much more convenient to use in the common case that you want to flush all the WAL. (Passing pg_current_wal_insert_lsn() as the argument doesn't work for the same reasons as explained in the comments: we need to be back off to the beginning of a page if the previous record ended at page boundary.) I plan to use this to fix the issue that Arseny Sher called out at https://github.com/neondatabase/neon/pull/7288#discussion_r1660063852
This commit is contained in:
committed by
GitHub
parent
9c32604aa9
commit
0789160ffa
@@ -469,9 +469,9 @@ neon_xlogflush(PG_FUNCTION_ARGS)
|
||||
* The LSN returned by GetXLogInsertRecPtr() is the position where the
|
||||
* next inserted record would begin. If the last record ended just at
|
||||
* the page boundary, the next record will begin after the page header
|
||||
* on the next page, and that's what GetXLogInsertRecPtr().returns,
|
||||
* but the page header has not been written yet. If we tried to flush
|
||||
* it, XLogFlush() would throw an error:
|
||||
* on the next page, but the next page's page header has not been
|
||||
* written yet. If we tried to flush it, XLogFlush() would throw an
|
||||
* error:
|
||||
*
|
||||
* ERROR : xlog flush request %X/%X is not satisfied --- flushed only to %X/%X
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user