Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres sixteen version #1013

Merged
merged 2 commits into from
Nov 17, 2023
Merged

Conversation

gkokolatos
Copy link
Collaborator

Add PGDLLEXPORT markings in exported bgworker functions

From postgres version 16 onward it is necessary for exported background worker
functions to be marked PGDLLEXPORT. Otherwise they are not findable by
LookupBackgroundWorkerFunction().

Failing to mark healthcheck entry point functions as such leads to a miss
functioning monitor as the child processes will fail to launch yet the monitor
will be running.

Adding the markings to previous postgres versions does not have any adverse
symptoms. Hence this commit adds them unconditionally.

While at it, improve the log messages by defining bgw_type.

From postgres version 16 onward it is necessary for exported background worker
functions to be marked PGDLLEXPORT. Otherwise they are not findable by
LookupBackgroundWorkerFunction().

Failing to mark healthcheck entry point functions as such leads to a miss
functioning monitor as the child processes will fail to launch yet the monitor
will be running.

Adding the markings to previous postgres versions does not have any adverse
symptoms. Hence this commit adds them unconditionally.
The structure member 'bgw_type' is used in various log messages within a
postgres process. When undeclared the log messages are filled with random chars
resulting to unparseable or broken messages.

Additionally by setting 'bgw_type' it is possible to group all healthckeck
workers in a process listing.
@dimitri dimitri merged commit 6698a7d into hapostgres:main Nov 17, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants