Skip to content

Conversation

@fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Mar 14, 2025

Initial PR: #194141

It seems the fix above was not enough as it was assumed that connection (or backend in pg terms) were NOT being reused when initiated through sql_db.connect.

For proper cleanup we need to reach this part of the code which can be done in 3 ways:

  • calling UNLISTEN * and committing
  • closing the connection
  • aborting the transaction (before committing the listen)

UNLISTEN * is a good candidate for this, but closing the connection seems to be the safer option.

Forward-Port-Of: #201814
Forward-Port-Of: #201401

Initial PR: odoo#194141

It seems the fix above was not enough as it was assumed that connection
(or backend in pg terms) were NOT being reused when initiated through
`sql_db.connect`.

For proper cleanup we need to reach [this part of the
code](https://github.com/postgres/postgres/blob/REL_16_STABLE/src/backend/commands/async.c#L1260-L1298)
which can be done in 3 ways:
 - calling UNLISTEN * and committing
 - closing the connection
 - aborting the transaction (before committing the listen)

`UNLISTEN *` is a good candidate for this, but closing the connection
seems to be the safer option.

X-original-commit: a5461e6
@robodoo robodoo added the forwardport This PR was created by @fw-bot label Mar 14, 2025
@robodoo
Copy link
Contributor

robodoo commented Mar 14, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 14, 2025

This PR targets 18.0 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@C3POdoo C3POdoo added the RD research & development, internal work label Mar 14, 2025
@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 14, 2025

@Williambraecky ci/runbot failed on this forward-port PR

@robodoo robodoo closed this in 49f4a03 Mar 15, 2025
gamarino pushed a commit to numaes/numa-public-odoo that referenced this pull request Mar 17, 2025
Initial PR: odoo/odoo#194141

It seems the fix above was not enough as it was assumed that connection
(or backend in pg terms) were NOT being reused when initiated through
`sql_db.connect`.

For proper cleanup we need to reach [this part of the
code](https://github.com/postgres/postgres/blob/REL_16_STABLE/src/backend/commands/async.c#L1260-L1298)
which can be done in 3 ways:
 - calling UNLISTEN * and committing
 - closing the connection
 - aborting the transaction (before committing the listen)

`UNLISTEN *` is a good candidate for this, but closing the connection
seems to be the safer option.

closes odoo/odoo#201936

X-original-commit: a5461e684d8afb6165d839c34e57b0e87d96b176
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
@fw-bot fw-bot deleted the 18.0-16.0-pg_xact-error-fix-2-wbr-423000-fw branch March 22, 2025 19:05
omar-sherif9992 pushed a commit to odoo-dev/odoo that referenced this pull request Mar 26, 2025
Initial PR: odoo#194141

It seems the fix above was not enough as it was assumed that connection
(or backend in pg terms) were NOT being reused when initiated through
`sql_db.connect`.

For proper cleanup we need to reach [this part of the
code](https://github.com/postgres/postgres/blob/REL_16_STABLE/src/backend/commands/async.c#L1260-L1298)
which can be done in 3 ways:
 - calling UNLISTEN * and committing
 - closing the connection
 - aborting the transaction (before committing the listen)

`UNLISTEN *` is a good candidate for this, but closing the connection
seems to be the safer option.

closes odoo#201936

X-original-commit: a5461e6
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forwardport This PR was created by @fw-bot RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants