-
Notifications
You must be signed in to change notification settings - Fork 2
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5859~1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5859
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 4 files changed
- 2 contributors
Commits on Aug 22, 2025
-
libpq: Don't hang on out-of-memory
If an allocation failed while handling an async notification, we returned EOF, which stopped processing any further data until more data was received from the server. If more data never arrives, e.g. because the connection was used just to wait for the notification, or because the next ReadyForQuery was already received and buffered, it would get stuck forever. Instead, silently ignore the notification. Silently ignoring the notification is not a great way to handle the situation, but at least the connection doesn't get stuck, and it's consistent with how the malloc() later in the function is handled, and with e.g. how pqSaveParameterStatus() handles allocation failures. Fix the same issue with OOM on receiving BackendKeyData message. That one is new in v18. Discussion: https://www.postgresql.org/message-id/[email protected]
Configuration menu - View commit details
-
Copy full SHA for 849a611 - Browse repository at this point
Copy the full SHA 849a611View commit details -
libpq: Handle OOMs by disconnecting instead of silently skipping mess…
…ages As noted in the previous commit, silently ignoring async notifications is not great. Our options for reporting errors are limited, but it seems better to terminate the connection than try to soldier on. Applications should handle connection loss gracefully, whereas silently missing a notification could cause much weirder problems. Similarly, if we run out of memory while saving a received ParameterStatus or cancellation key, disconnect. This also changes the error message on OOM while expanding the input buffer. It used to report "cannot allocate memory for input buffer", followed by "lost synchronization with server: got message type ...". The "lost synchronization" message seems unnecessary, so remove that and report only "cannot allocate memory for input buffer". (The comment speculated that the out of memory could indeed be caused by loss of sync, but that seems highly unlikely.) Discussion: https://www.postgresql.org/message-id/[email protected]
Configuration menu - View commit details
-
Copy full SHA for 281757d - Browse repository at this point
Copy the full SHA 281757dView commit details -
libpq: Be strict about cancel key lengths
The protocol documentation states that the maximum length of a cancel key is 256 bytes. This starts checking for that limit in libpq. Otherwise third party backend implementations will probably start using more bytes anyway. We also start requiring that a protocol 3.0 connection does not send a longer cancel key, to make sure that servers don't start breaking old 3.0-only clients by accident. Finally this also restricts the minimum key length to 4 bytes (both in the protocol spec and in the libpq implementation). Author: Jelte Fennema-Nio <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected]
Configuration menu - View commit details
-
Copy full SHA for 00e2825 - Browse repository at this point
Copy the full SHA 00e2825View commit details -
[CF 5859] v4 - Allow missing BackendKeyData message & enforce cancel …
…key length This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5859 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/[email protected] Author(s): Jelte Fennema-Nio
Commitfest Bot committedAug 22, 2025 Configuration menu - View commit details
-
Copy full SHA for f531701 - Browse repository at this point
Copy the full SHA f531701View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5859~1...cf/5859