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

Feature Request: Support BEGIN PRIORITY X for pgx #124

Open
danthegoodman1 opened this issue Jan 24, 2022 · 3 comments
Open

Feature Request: Support BEGIN PRIORITY X for pgx #124

danthegoodman1 opened this issue Jan 24, 2022 · 3 comments

Comments

@danthegoodman1
Copy link

danthegoodman1 commented Jan 24, 2022

Currently there is no way to specify the priority of a transaction when using the pgx integration on initialization of the transaction. This results in another round trip to the DB with a SET TRANSACTION PRIORITY.

It would be stellar if there was an option in crdbpgx.ExecuteTx() that would allow specification of a transaction priority.

@rafiss
Copy link
Contributor

rafiss commented Apr 14, 2023

Until we resolve this, one option you could consider is to use the default_transaction_priority session variable. It controls the default priority for all transactions created in the current session, so it's another way of avoiding that round-trip.

One issue that makes it a bit harder to make this change is that it seems we'd have to make a backward-incompatible change to the interface, so that transaction priority can be passed in.

@danthegoodman1
Copy link
Author

danthegoodman1 commented Apr 16, 2023

Not particularly keen on using 2 connection pools, so I'll be patient and look forward to an update :P (although that's what I've been doing where needed)

@HeCorr
Copy link

HeCorr commented Jun 15, 2023

Related: jackc/pgx#1643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants