ld-873233 opened a new pull request, #2600:
URL: https://github.com/apache/age/pull/2600
Backport of #2581 (fixes #2580) to `PG18`.
#2581 is merged on `master`, but PostgreSQL 18 users run AGE from `PG18`
(newest tag `PG18/v1.8.0-rc0`, the
`apache/age:release_PG18_1.8.0` image), which does not carry it. On those
servers the failure described in #2580 leaves
PostgreSQL refusing new connections in every database (`FATAL: failed to
re-find shared lock object`) until it restarts.
**The change** is #2581's commit, cherry-picked with `-x`
(06ce678d74210539705c77e2dc7c9fa861e2a331). It applies cleanly to
`PG18` (one file, +9; only the line offset differs). `access/xact.h` is
already included in `ag_catalog.c` on this branch.
**Tested** on PostgreSQL 18.6 (`18.6-1.pgdg13+2`, stock
`postgres:18.6-trixie`), AGE built from source as in
`installcheck.yaml` (`make COPT=-Werror install`):
| | `PG18` head (e43dc1a) | this branch |
| --- | --- | --- |
| build with `COPT=-Werror` | ok | ok |
| `make installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm"` | 45 of
45 passed | 45 of 45 passed |
| reproduction (below), 90 s | 99 `ROLLBACK`s failed with
`ResourceOwnerEnlarge called after release started`, then `FATAL: failed to
re-find shared lock object` and the client could not reconnect | 4,157
statements stopped, every `ROLLBACK` succeeded, 30 of 30 new connections
afterwards; the server logged only the statement timeouts |
Reproduction (a different shape from #2580's, same mechanism): AGE NOT in
`shared_preload_libraries`; two sessions run
`LOAD 'age'`, then loop `BEGIN; SET LOCAL statement_timeout = '40ms'; SELECT
* FROM cypher(...)` with a variable-length
match (`[:L*1..6]`, 1,000 vertices, 4,000 edges) that the timeout stops,
then `ROLLBACK`. A third session in another
database loops plain `CREATE TABLE` / `CREATE INDEX` / `DROP TABLE` (no AGE
involved), which resets the other sessions'
caches.
Controls from the same series on `PG18` head (`release_PG18_1.8.0` image
unless noted; the plain-DDL loop above unless
noted), 60-90 s each:
- AGE loaded is required: a plain-SQL sort stopped by `temp_file_limit`
failed its `ROLLBACK` 98 of 138 times with AGE
preloaded, and 0 of 1,058 times on stock PostgreSQL 18.6 without AGE.
- not every failure triggers it: a trivial error (`SELECT 1/0`, AGE
preloaded) failed 0 of 197,155 `ROLLBACK`s, and
successful reads followed by `ROLLBACK` 0 of 121,317 (that run's DDL loop
was `create_graph` / `drop_graph`).
- a session-level `LOAD 'age'` is enough: with AGE NOT preloaded, 98 of 112
failed — so leaving it out of
`shared_preload_libraries` does not avoid the failure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]