steve-chavez
abe414ad88
nix: print how to tail the server logs
...
For easier debugging during loadtests.
Also prefix the echo traces for the postgrest-with-pgrst command.
2026-02-12 20:18:08 -05:00
steve-chavez
e95e815483
fix: don't hide async exceptions in logs
...
Fixes #4646 . Using the repro on #4646 , this now produces the log:
```
11/Feb/2026:09:40:08 -0500: Warp server error: stack overflow
```
When:
```
$ curl localhost:3000/
curl: (52) Empty reply from server
```
2026-02-12 19:43:50 -05:00
Taimoor Zaeem and Wolfgang Walther
c3500bd3af
docs(install): update postgresql minimum supported version
...
PostgREST dropped support for PostgreSQL version 12 however,
it was not reflected in the docs.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-02-12 09:22:01 +00:00
Taimoor Zaeem and Steve Chavez
99984d328e
docs: add section on docker resource constraints
...
Closes #4623 .
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-02-06 16:30:47 -05:00
Taimoor Zaeem and Steve Chavez
aaaf7e96bd
test(io): set client_min_messages to warning in SQL fixtures
...
To suppress unwanted "NOTICE: ..." messages which pollute the log.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-02-04 09:20:03 -05:00
Taimoor Zaeem and Steve Chavez
37fc0a211b
test(io): refactor SQL fixtures
...
- Move privileges and grants to privileges.sql
- Move schema, tables and functions to schema.sql
- Move global database settings to database.sql
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-02-04 09:20:03 -05:00
Taimoor Zaeem and Steve Chavez
c35eb7a6c2
test(io): move role fixtures to roles.sql
...
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-02-02 17:38:32 -05:00
Taimoor Zaeem and Steve Chavez
2bd4b07418
chore: add entry for a feature which was a breaking change
...
Adds the associated breaking change entry in CHANGELOG.md
for #4517 .
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-02-02 09:14:58 -05:00
steve-chavez
55cd5a23ff
chore: move fixed entry to feature in changelog
2026-01-30 16:23:30 -05:00
Taimoor Zaeem and Steve Chavez
72a9d70f09
chore: add changelog entry for v14.4
...
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-01-30 08:46:47 -05:00
Laurence Isla
d10c779fc6
perf: optimize count=exact when there's no limits, offsets or db-max-rows
2026-01-28 18:43:44 -05:00
Laurence Isla
d031bb2df5
refactor: use a single function to get the page_total count
2026-01-28 18:43:44 -05:00
Michal Kleczek and GitHub
73a465501e
fix: listener running with exception masked after first failure
2026-01-28 17:13:59 -05:00
Wolfgang Walther
6f1fe69433
docs: add Wolfgang Walther as author
...
This was done in other places in
ffa393850a , but missed in the docs.
2026-01-28 09:59:42 +01:00
Wolfgang Walther
246239f42a
docs: fix links
...
datrium.com doesn't exist anymore, while euronodes.com seems to only
fail SSL in CI.
2026-01-28 09:57:09 +01:00
Laurence Isla
1682677297
fix: filtering the returned representation whenn using or/and filters on mutations
2026-01-27 21:24:19 +00:00
Michał Kłeczek and Steve Chavez
21b8c3458a
add: Log pg version details of listener connection
...
Follow-up to #4617 adding more information to log entry produced upon successful listener connection establishement.
2026-01-27 15:44:05 -05:00
Michał Kłeczek and Steve Chavez
5356f4e973
add: Log actual host and port of listener connection
...
Diagnosing problems with listener channel notifications not being handled properly by PostgREST connected to read replicas is difficult. Issues might be related to lost connections and listener not being connected to the right host after failover or database server restarts.
This patch adds logging of actual host:port used by libpq connection opened by the listener. It should make it easier to find out if PostgREST is connected to the right host.
2026-01-27 11:00:30 -05:00
Michal Kleczek and GitHub
00c7cb1a22
fix: ensure Listener connections are released
...
retryingListen function potentially leaks database connections. This patch ensures the connections are released in case of listen/notify errors.
2026-01-26 16:26:24 -05:00
Taimoor Zaeem and Steve Chavez
d75b1a7e96
docs: using default parameters on RPC with GET request
...
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-01-26 08:06:48 -05:00
Taimoor Zaeem and GitHub
fe0386e9c4
add: string slicing operator for jwt-role-claim-key ( #4603 )
2026-01-24 05:40:21 -05:00
Taimoor Zaeem and Wolfgang Walther
5a4c11c72a
chore(ci): correct slightly misleading name of coverage workflow
...
The coverage workflow mentions that we run the tests against PG 15,
however that is incorrect and misleading. We actually run it against the
latest supported PostgreSQL version according to the nix scripts.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-01-18 14:53:52 +00:00
Laurence Isla and GitHub
c15e908266
add(logs): Include a HINT when the LISTEN channel breaks due to a Postgres bug
...
The HINT shows a SQL command that solves the issue.
2026-01-18 18:47:53 +07:00
Taimoor Zaeem and Steve Chavez
c18727ff43
refactor: move walkJSPath to Config/JSPath.hs module
...
The logic to evaluate `JSPath` belongs to `JSPath.hs` module.
Hence, moving this logic from `Auth/Jwt.hs` to here.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-01-14 22:34:08 +07:00
Michał Kłeczek and Steve Chavez
886df84e87
test: Fix flakiness of test_second_request_for_non_existent_table_should_be_quick
...
Changed divider in assertion (response.elapsed.total_seconds() < first_duration / divider) to 2 (from 10).
2026-01-13 11:37:50 +07:00
renovate[bot] and Wolfgang Walther
8f5fe3f46b
chore(deps): update haskell-actions/setup action to v2.10.2
2026-01-11 17:31:31 +00:00
steve-chavez
ffa393850a
chore: update LICENSE
2026-01-11 11:59:31 +08:00
Kian-Meng Ang and Steve Chavez
f5c7cde9b7
docs: fix typos
...
Found via `codespell -S test -L notin,nam,plantext,cryto,corelation,inout,ot`
2026-01-06 05:24:51 +08:00
renovate[bot] and Wolfgang Walther
0018c38f79
chore(deps): update haskell-actions/setup action to v2.10.1
2026-01-05 19:02:21 +00:00
Taimoor Zaeem and Steve Chavez
9042457326
chore: add changelog entry for v14.3
...
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-01-04 13:13:00 +08:00
Taimoor Zaeem and Steve Chavez
e988fe49ed
chore: move changelog entry to unreleased section
...
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-01-03 15:18:51 +08:00
Michał Kłeczek and Steve Chavez
e592d568c6
fix: Performance and high memory usage of relation hint calculation
...
* Calculation of hint message when requested relation is not present in schema cache requires creation of a FuzzySet (to use fuzzy search to find candidate tables). For schemas with many tables it is costly.
This patch introduces dbTablesFuzzyIndex in SchemaCache to memoize the FuzzySet creation.
* Additionally, because of FuzzySet large memory requirements, this patch introduces a limit of 500 relations per schema, above which FuzzySet is not created and hint calculation disabled.
2026-01-03 07:56:12 +08:00
Taimoor Zaeem and Steve Chavez
9ec5b030ce
refactor: move content negotiation logic to Negotiate.hs
...
Moves the `negotiateContent` function to `Plan/Negotiate.hs`
module. This also adds comments to describe the current approach
we have for negotiation.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2026-01-02 06:32:17 +08:00
steve-chavez
76e0e1fbff
nix: fix sleep default on postgrest-with-pgrst
...
The sleep was always applying since it had a default.
2026-01-02 06:11:07 +08:00
steve-chavez
b8ca1bb04c
nix: add new loadtest for errors
...
Also included it in CI.
2025-12-23 15:00:24 -05:00
steve-chavez
57c5ff5db3
nix: show wait time for fixture loading
2025-12-23 15:00:24 -05:00
steve-chavez
2b83dcc794
nix: sleep param for withPgrst
2025-12-23 15:00:24 -05:00
steve-chavez
7c3bccf4ba
nix: show wait time on withPgrst
2025-12-23 15:00:24 -05:00
steve-chavez
d2aa6c1b8a
nix: timeout param for withPgrst
2025-12-23 15:00:24 -05:00
Taimoor Zaeem and Steve Chavez
a329bca16b
nix: add config file for hlint
...
Adds a config file for hlint containing arguments and
custom warnings.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2025-12-22 14:19:46 -05:00
388930336d
refactor: fix definition of Ord instance for Routine type ( #4577 )
...
The `Ord` instance definition for type `Routine` had a logical
error when comparing two routines. The error did not affect any
end users. However, for correctness and completeness reasons, this
commit fixes the error.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
Co-authored-by: Joel Jacobson <joel@compiler.org >
2025-12-22 08:34:29 +00:00
renovate[bot] and Wolfgang Walther
d06377a37b
chore(deps): update docker/setup-buildx-action action to v3.12.0
2025-12-20 20:25:19 +00:00
Taimoor Zaeem and Steve Chavez
eed018fe1d
chore: add changelog entry for v14.2
...
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2025-12-19 12:29:57 -05:00
steve-chavez
013f078bc4
fix: inaccurate Server-Timing durations
...
The transaction duration was notably off, doing:
```
curl localhost:3000/rpc/sleep?seconds=5 -i
```
Shows `46.1` for the `transaction;dur`, with this fix we obtain
`5007.3`.
Fixes https://github.com/PostgREST/postgrest/issues/4522
This also fixes inaccurate "schema cache queried" logs,
see https://github.com/PostgREST/postgrest/issues/4551 .
2025-12-18 17:35:18 -05:00
renovate[bot] and Wolfgang Walther
2bcd336400
chore(deps): update haskell-actions/setup action to v2.9.1
2025-12-17 18:01:04 +00:00
steve-chavez
8f34afd66e
nix: jwt loadtest chain commands and split rsa gen
...
Chaining the target generation command after the build is done ensures
that if a build takes too long, the dynamic target generation for vegeta
won't cause 401 Unauthorized errors due to already expired JWTs.
Also split the rsa materials writing to another python program for
easier maintenance.
2025-12-16 21:15:28 -05:00
steve-chavez
4cdc4c4861
nix: show build time on postgrest-with-pgrst
2025-12-16 21:15:28 -05:00
steve-chavez
050554e2bb
nix: fail jwt loadtest in case of 401
...
Also print last unauthorized body
2025-12-16 21:15:28 -05:00
Taimoor Zaeem and Steve Chavez
b3b7bd9327
docs: add link on how to start docker service
...
Closes #4552 .
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com >
2025-12-16 11:34:04 -05:00
renovate[bot] and Wolfgang Walther
dac8a5fb86
chore(deps): update haskell-actions/setup action to v2.9.0
2025-12-15 21:01:22 +00:00