mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 05:52:55 +00:00
WaitEventSetWait() returns the number of "events" that happened, and only that many events in the WaitEvent array are updated. When the timeout is reached, it returns 0 and does not modify the WaitEvent array at all. We were reading 'event.events' without checking the return value, which would be uninitialized when the timeout was hit. No test included, as this is harmless at the moment. But this caused the test I'm including in PR #10882 to fail. That PR changes the logic to loop back to retry the PQgetCopyData() call if WL_SOCKET_READABLE was set. Currently, making an extra call to PQconsumeInput() is harmless, but with that change in logic, it turns into a busy-wait.
neon extension consists of several parts:
shared preload library neon.so
-
implements storage manager API and network communications with remote page server.
-
walproposer: implements broadcast protocol between postgres and WAL safekeepers.
-
control plane connector: Captures updates to roles/databases using ProcessUtility_hook and sends them to the control ProcessUtility_hook.
-
remote extension server: Request compute_ctl to download extension files.
-
file_cache: Local file cache is used to temporary store relations pages in local file system for better performance.
-
relsize_cache: Relation size cache for better neon performance.
SQL functions in neon--*.sql
Utility functions to expose neon specific information to user and metrics collection. This extension is created in all databases in the cluster by default.