FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Execute UNLISTEN unconditionally in connection reset query by elprans · Pull Request #698 · MagicStack/asyncpg · GitHub

Execute UNLISTEN unconditionally in connection reset query - #698

Closed
elprans wants to merge 1 commit into
masterfrom
unlisten
Closed

Execute UNLISTEN unconditionally in connection reset query#698
elprans wants to merge 1 commit into
masterfrom
unlisten

Conversation

elprans commented Feb 10, 2021

Copy link
Copy Markdown
Member

Currently, UNLISTEN in connection release is guarded by an
expensive PL/pgSQL block, because historically PostgreSQL
did not allow UNLISTEN on a hot standby node. This has since
changed, and UNLISTEN is allowed in PostgreSQL 9.4.21+, 9.5.16+,
9.6.12+, 10.7+, 11.2+, and versions 12 and newer. If this change
breaks your setup, upgrade your server.

The removal of the PL/pgSQL guard reduces the acquire/release overhead
by over 50%.

Upstream discussion: https://postgr.es/m/CADT4RqCf2gA_TJtPAjnGzkC3ZiexfBZiLmA-mV66e4UyuVv8bA@mail.gmail.com

Fixes: #648

Currently, `UNLISTEN` in connection release is guarded by an
expensive PL/pgSQL block, because historically PostgreSQL
did not allow `UNLISTEN` on a hot standby node.  This has since
changed, and `UNLISTEN` is allowed in PostgreSQL 9.4.21+, 9.5.16+,
9.6.12+, 10.7+, 11.2+, and versions 12 and newer.  If this change
breaks your setup, upgrade your server.

The removal of the PL/pgSQL guard reduces the `acquire`/`release` overhead
by over 50%.

Upstream discussion: https://postgr.es/m/CADT4RqCf2gA_TJtPAjnGzkC3ZiexfBZiLmA-mV66e4UyuVv8bA@mail.gmail.com

Fixes: #648
elprans requested a review from fantix February 10, 2021 05:17
elprans closed this Feb 10, 2021
elprans deleted the unlisten branch February 10, 2021 05:20

fantix commented Feb 10, 2021

Copy link
Copy Markdown
Member

Shortest-lived PR ever 😆

elprans commented Feb 10, 2021

Copy link
Copy Markdown
Member Author

I didn't realize the work was already done in #648.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL