queue_job: support running when pgbouncer is used (share config with bus_alt_connection)

Open
#1,035 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
postgresql, python
Domain
backend, databases

Research direction

The runner's LISTEN cursor is the place to start; find where queue_job opens its listening connection and compare with how bus_alt_connection picks alternative connection parameters from settings or environment variables. The issue does not name exact files, so confirm the entry point first. Done when the runner can use the alternative connection for LISTEN when the configuration is present and falls back otherwise.

Written by the indexing model from the issue text.

Description

bug

The module bus_alt_connection (in OCA/server-tools) allows using different connection parameters in the bus addon to issue the LISTEN imbus SQL request. This allows configuring pgbouncer in transaction mode to pool connections to the database server, lowering the number of connections to the db, and therefore allowing to tune postgresql more aggressively.

The queue_job runner also uses LISTEN and would benefit from sharing the configuration done for bus_alt_connection: if the settings / environment variables are available, then use the alternative connection to get the cursor that will LISTEN.

See also https://github.com/OCA/server-tools/issues/3863

Dominant language
Python
Stars
271
Forks
602
Avg merge
8d 3h
Merged PRs (30d)
4

Getting set up

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.

More from OCA/queue

All issues in OCA/queue

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.