Skip to content

v14: refactor: move socket creation and management to App module#4774

Merged
taimoorzaeem merged 1 commit intoPostgREST:v14from
taimoorzaeem:v-14/refactor/socket-creation
Apr 2, 2026
Merged

v14: refactor: move socket creation and management to App module#4774
taimoorzaeem merged 1 commit intoPostgREST:v14from
taimoorzaeem:v-14/refactor/socket-creation

Conversation

@taimoorzaeem
Copy link
Copy Markdown
Member

@taimoorzaeem taimoorzaeem commented Apr 2, 2026

Backport for #4713. Intruded in clean backporting otherwise.

Right now listening sockets initialization, management and usage is split between App, AppState and Admin modules: they are created in AppState.init and remembered in AppState but used only in App and Admin.

It has several negative consequences:
- sockets are initialized even if not needed (eg. command line invocations like dump-config or dump-schema)
- it is impossible to start listening on a socket after initial schema cache load because it requires AppState

This change decouples listen socket management from AppState. Sockets are created only when needed (ie. not in command line tools invocation) and passed to admin application and to Warp by the App module.
@taimoorzaeem taimoorzaeem merged commit 8262faa into PostgREST:v14 Apr 2, 2026
31 checks passed
@taimoorzaeem taimoorzaeem deleted the v-14/refactor/socket-creation branch April 2, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants