postgresql/src/include/port
Alvaro Herrera f3ff7bf83b
Add XLogCtl->logInsertResult
This tracks the position of WAL that's been fully copied into WAL
buffers by all processes emitting WAL.  (For some reason we call that
"WAL insertion").  This is updated using atomic monotonic advance during
WaitXLogInsertionsToFinish, which is not when the insertions actually
occur, but it's the only place where we know where have all the
insertions have completed.

This value is useful in WALReadFromBuffers, which can verify that
callers don't try to read past what has been inserted.  (However, more
infrastructure is needed in order to actually use WAL after the flush
point, since it could be lost.)

The value is also useful in WaitXLogInsertionsToFinish() itself, since
we can now exit quickly when all WAL has been already inserted, without
even having to take any locks.
2024-04-07 14:06:30 +02:00
..
atomics Introduce atomic read/write functions with full barrier semantics. 2024-02-29 10:00:44 -06:00
win32 Fix gai_strerror() thread-safety on Windows. 2024-02-12 11:14:21 +13:00
win32_msvc windows: msvc: Define STDIN/OUT/ERR_FILENO. 2022-07-18 17:21:54 -07:00
atomics.h Add XLogCtl->logInsertResult 2024-04-07 14:06:30 +02:00
cygwin.h Simplify declaring variables exported from libpgcommon and libpgport. 2021-11-29 11:00:00 -05:00
darwin.h Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
freebsd.h Improve the naming in wal_sync_method code. 2023-10-13 15:16:45 -05:00
linux.h Improve the naming in wal_sync_method code. 2023-10-13 15:16:45 -05:00
netbsd.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
openbsd.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pg_bitutils.h Optimize visibilitymap_count() with AVX-512 instructions. 2024-04-06 22:58:23 -05:00
pg_bswap.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_crc32c.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_iovec.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_lfind.h Improve style of pg_lfind32(). 2024-03-27 20:26:05 -05:00
pg_pthread.h Add missing pthread_barrier_t. 2021-03-10 17:44:04 +13:00
simd.h Fix signedness error in 9f225e992 for gcc 2024-03-06 15:55:55 +07:00
solaris.h Remove obsolete HAVE_BUGGY_SOLARIS_STRTOD 2020-08-15 11:27:41 +02:00
win32.h mingw: Define PGDLLEXPORT as __declspec (dllexport) as done for msvc 2022-09-30 10:50:05 -07:00
win32_port.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
win32ntdll.h Update copyright for 2024 2024-01-03 20:49:05 -05:00