Skip to content

Commit

Permalink
tests: Make neon_xlogflush() flush all WAL, if you omit the LSN arg (#…
Browse files Browse the repository at this point in the history
…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
#7288 (comment)
  • Loading branch information
hlinnaka authored Jul 1, 2024
1 parent 9c32604 commit 0789160
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pgxn/neon_test_utils/neontest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

1 comment on commit 0789160

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3088 tests run: 2964 passed, 0 failed, 124 skipped (full report)


Flaky tests (2)

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 32.7% (6915 of 21149 functions)
  • lines: 50.0% (54204 of 108321 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
0789160 at 2024-07-01T17:24:32.282Z :recycle:

Please sign in to comment.