PostgREST / PostgREST/postgrest

Document that `max-idletime` will be enforced when receiving a request

Open
#3,941 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Haskell
Stars
27.7k
Forks
1.2k
Avg merge
1d 9h
Merged PRs (30d)
54

Description

It's only after I make a request that the connection is released for "idletime"

IIRC, the idle pool connections are only recycled when AppState.usePool is called (which in turn calls Hasql.Pool.use).

Maybe this should be documented, although ideally idle connections should be recycled as soon max-idletime is reached. One option could be to call https://hackage.haskell.org/package/hasql-pool-1.3/docs/Hasql-Pool.html#v:release in a background thread periodically (maybe in max-idletime periods), but likely that will affect performance.

Originally posted by @steve-chavez in #3902

Contributor guide

Open the contributing guide

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 documentation file or test is named. Start by reading AppState.usePool and Hasql.Pool.use, then document that max-idletime is enforced when a request receives a pooled connection; done means the documented behavior matches the pool's actual lifecycle.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.