Files
neon/pgxn/neon
MMeent 0e4f182680 Rework PageStream connection state handling: (#7611)
* Make PS connection startup use async APIs
   This allows for improved query cancellation when we start connections
 * Make PS connections have per-shard connection retry state.
   Previously they shared global backoff state, which is bad for quickly
   getting all connections started and/or back online.
 * Make sure we clean up most connection state on failed connections.
   Previously, we could technically leak some resources that we'd otherwise
   clean up. Now, the resources are correctly cleaned up.
 * pagestore_smgr.c now PANICs on unexpected response message types.
   Unexpected responses are likely a symptom of having a desynchronized
   view of the connection state. As a desynchronized connection state can
   cause corruption, we PANIC, as we don't know what data may have been
   written to buffers: the only solution is to fail fast & hope we didn't
   write wrong data.
 * Catch errors in sync pagestream request handling.
   Previously, if a query was cancelled after a message was sent to
   the pageserver, but before the data was received, the backend
   could forget that it sent the synchronous request, and let others
   deal with the repercussions. This could then lead to incorrect
   responses, or errors such as "unexpected response from page
   server with tag 0x68"
2024-05-23 23:26:42 +02:00
..
2023-11-23 18:53:03 +00:00
2023-12-18 21:05:29 +02:00

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.