Transactions always re-query all types leading to huge delay
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 374
- Avg merge
- 11d 16h
- Merged PRs (30d)
- 1
Description
Hey,
We're noticing big delays on certain transactions, we tracked it down to be the 'fetch types' functionality that queries select b.oid, b.typarray from pg_catalog.pg_type a left join pg_catalog.pg_type b on b.oid = a.typelem where a.typcategory = 'A' group by b.oid, b.typarray order by b.oid.
Each transaction re-fetches the types, disabling that feature however threw errors: PostgresError: malformed array literal: ""
Is there anything we can do against this delay? It delays them by 200ms+ on our side.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the transaction path that invokes the “fetch types” functionality and inspect the supplied pg_catalog query. Reproduce the delay and the malformed array literal error when that functionality is disabled; done means avoiding unnecessary repeated type queries without reintroducing the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgresql
- Domain
- backend, databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100