riverqueue / riverqueue/river

configuring schema using search path does not work well in pgbouncer in transaction mode

Open
#345 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.7k
Forks
179
Avg merge
15h 43m
Merged PRs (30d)
13

Description

so I can't seem to find a way to use poll only mode with a custom search path behind pgbouncer/similar in transaction pooling mode.

the recommendation I have read is to use pgx "search_path" in order to configure the schema that the river clients will use.

but behind pgbouncer, search path is not supported, for technical reasons.

https://github.com/pgbouncer/pgbouncer/issues/89

we use an in-house rewrite of pgbouncer and so we made search path work correctly for session connections, which seems to be working, but tracking search path in transaction mode is a bigger lift so we haven't tried (as the search path isn't in parameters, you would need to do an extra query before giving the conn the session for the transaction to set the search path)

for now we are just going to run everything in session mode.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or implementation entry points are named. Start by investigating how River configures PostgreSQL search_path through pgx and how transaction pooling in PgBouncer affects that state; done would require a defined, tested way to configure the schema in transaction mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.