Wolfgang Walther and Wolfgang Walther
86c3257f54
feat: Fail schema cache lookup with invalid db-schemas config
...
Previously, we'd silently report "200 OK" on the root endpoint, but
would never return any endpoints from the schema cache.
Now the schema cache query fails because of the ::regnamespace cast.
2024-07-09 08:31:31 +02:00
Wolfgang Walther and Wolfgang Walther
01a18d8199
fix: List correct enum options when multiple types with same name are present
...
The schema cache and OpenAPI output would currently list the first found
enum with the same name instead of the correct type. One other case
where this comes up is when a regular type and an enum type have the
same name. For example in the spec fixtures, we have an enum called
"bit". Every "bit" type, no matter whether it's that enum or the
built-in bit type, will show those enum options in the OpenApi output.
Not adding a test, because OpenAPI is supposed to go away in the future
anyway.
2024-07-09 08:31:31 +02:00
Wolfgang Walther and Wolfgang Walther
0335b465d7
fix: Show number of loaded timezones in log output
...
There is no reason to hide those, right?
2024-07-09 08:31:31 +02:00
Wolfgang Walther and Wolfgang Walther
957472a7a7
fix: Make --dump-schema work with in-database pgrst.db_schemas setting
...
This needs to be loaded from in-database configuration first, otherwise
the dump-schema output will be for the default (public) schema.
2024-07-09 08:31:31 +02:00
Wolfgang Walther and Wolfgang Walther
ee4bfbf253
perf: Pass arguments to RPCs called via GET directly
...
Previously they were passed as a JSON payload. This results in a LATERAL
join for the calling expression, which prevents LIMIT from being pushed
into the inlined function call, making some requests really slow.
Resolves #2858
2024-07-09 08:29:13 +02:00
Laurence Isla
c3070bbd4e
fix: nested empty embeds no longer return empty values and are correctly omitted
2024-07-04 14:21:47 -05:00
Laurence Isla
e0baf7e78e
feat: log error message when JWT secret is less than 32 characters long
...
breaking change: PostgREST now fails to start or reload the config when the JWT secret is less than 32 characters long.
2024-07-04 12:06:24 -05:00
Laurence Isla
d9385a4523
changelog: update to 12.2.1
2024-07-03 18:57:19 -05:00
Andrei Dziahel and GitHub
06cbc4be36
config forbid same server-port and admin-server-port ( #3559 )
...
* fix: forbid same server-port and admin-server-port
Forbids server-port and admin-server-port from being equal altogether,
despite they might not conflict at all in case admin and app are bound
to different addresses. Implemented as per the discussion at
https://github.com/PostgREST/postgrest/issues/3508#issuecomment-2125123633
2024-07-03 13:02:02 -05:00
Laurence Isla
40ed349bba
changelog: add missing entries for #3592 and #3616
2024-06-26 19:46:36 -05:00
steve-chavez
f912c0dd29
fix: don't reload cache on every listener fail
...
Revert "prevent GSSAPI error between Listener and pool"
This reverts commit 4beac10d3d .
2024-06-25 20:03:22 -05:00
Andrei Dziahel and GitHub
9d7e87b3e0
feat: add the "admin-server-host" config to set the host for the admin server
2024-06-24 14:47:19 -05:00
Wolfgang Walther and Wolfgang Walther
bb96c2dc74
feat: Drop support for pg 11
...
PostgreSQL 11 is EOL since November 2023.
2024-06-15 17:23:34 +02:00
Wolfgang Walther and Wolfgang Walther
126178642b
feat: Drop support for pg 10
2024-06-15 17:23:34 +02:00
Wolfgang Walther and Wolfgang Walther
daa77d17aa
feat: Drop support for pg 9.6
2024-06-15 17:23:34 +02:00
steve-chavez
ec89f6b90c
bump version to 12.2.0
2024-06-11 09:57:05 -05:00
steve-chavez
82aa58a08f
docs: deprecate EOL pg versions
2024-06-11 09:43:09 -05:00
Wolfgang Walther
70a8a80491
Revert "fix: Build static postgrest with GSSAPI support"
...
This reverts commit c94aa9ccd9 .
2024-06-05 19:59:07 +02:00
Laurence Isla
9c165e3edb
fix: log connection pool events on log-level="debug" instead of "info"
2024-05-24 17:19:31 -05:00
steve-chavez
da9e497ef1
changelog: add architecture doc
2024-05-23 19:34:42 -05:00
Laurence Isla
4e0ffa6d0a
changelog: fix link for deprecated feature
2024-05-22 19:16:01 -05:00
Taimoor Zaeem and Steve Chavez
8cbcf9867b
feat: add config db-hoisted-tx-settings to allow only hoisted function settings
2024-05-21 19:50:03 -05:00
Laurence Isla and GitHub
aea563bd82
fix: remove verbosity from some error logs
...
Error logs starting with "An error occured..." are replaced with "Failed to..."
2024-05-21 16:44:28 -05:00
Taimoor Zaeem and Steve Chavez
5cc32c7f87
fix: fix incorrect 413 error on pg 54* errors
2024-05-20 18:59:33 -05:00
steve-chavez
7e61c9deb0
feat: force read-write for listener connection
2024-05-19 23:14:19 -05:00
steve-chavez
3cf565614d
fix: listener retries with exponential backoff
...
Also corrects the admin ready response which now considers the listener
state.
2024-05-19 20:48:59 -05:00
steve-chavez
756aad7827
fix: listener silent fail on replica
...
Update hasql-notifications to include the fix on
https://github.com/diogob/hasql-notifications/issues/24 .
Which now reveals the following error:
```
$ postgrest-with-postgresql-16 --replica -f test/spec/fixtures/load.sql postgrest-run
17/May/2024:18:35:38 -0500: Successfully connected to PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
17/May/2024:18:35:38 -0500: Could not listen for notifications on the "pgrst" channel. ERROR: cannot execute LISTEN during recovery
17/May/2024:18:35:38 -0500: Retrying listening for notifications...
```
This is still not good because the LISTEN channel will be retried
forever without a backoff.
2024-05-18 23:33:04 -05:00
Laurence Isla and Steve Chavez
334c2710f6
changelog: update to 12.0.3
2024-05-11 13:30:50 -05:00
Andrei Dziahel and Wolfgang Walther
3026c1f308
fix: Parse accept header case-insensitively
...
The Accept header is parsed case-insensitively now, introducing proper
handling of media types specified in upper- and/or mixed-case.
Fixes #3478
2024-05-09 19:30:42 +02:00
steve-chavez
0060abeb01
feat: /live and /ready respond with 500 on failure
...
503 is still used by /ready to indicate a transient state
that can be recovered from.
2024-05-08 17:19:48 -05:00
steve-chavez
b34c00c522
changelog: add missing entry for 3184
2024-05-06 11:12:45 -05:00
steve-chavez
1d4f31514f
changelog: move 3340 from fixed to added
...
Since it was a feature
2024-05-06 11:12:45 -05:00
steve-chavez
7e91e5311d
fix: not adding application_name on all URIs
2024-05-06 11:12:45 -05:00
Taimoor Zaeem and Steve Chavez
21bc48ad9a
fix: fix wrong 503 Service Unavailable on pg error 53400
2024-05-06 07:54:11 -05:00
Laurence Isla and GitHub
69bbce5b32
feat: improve PGRST121 error message
...
* Clarify the message field
* Show failed MESSAGE or DETAIL in the the PGRST121 error's details field
* Show the correct JSON format in the hint field
2024-04-24 13:33:10 -05:00
steve-chavez
357400b2b8
feat: schema cache metrics
2024-04-23 19:08:37 -05:00
steve-chavez
653c7955b2
feat: connection pool metrics in admin server
2024-04-23 19:08:37 -05:00
steve-chavez
3e615bd0d9
feat: add log-level=debug
2024-04-22 21:36:29 -05:00
Taimoor Zaeem and Steve Chavez
88abf600c4
fix: fix wrong http status on pg error 42P17 infinite recursion
2024-04-22 13:40:07 -05:00
Laurence Isla and Steve Chavez
0d13b842a6
fix: OpenAPI now tags a FK correctly on O2O relationships
2024-04-18 17:08:14 -05:00
steve-chavez
1bf0c54dd6
feat: log connection pool events on log-level=info
2024-04-15 18:31:51 -05:00
Taimoor Zaeem and Steve Chavez
973201a8d3
fix: remove rejected mediatype application/vnd.pgrst.object+json from response
2024-04-13 16:07:38 -05:00
Laurence Isla
70396d3f6c
docs: add dark mode
...
- Uses sphinx-rtd-dark-mode for sphinx-rtd-theme
- Adds dark mode logos for sponsors
2024-04-10 18:37:57 -05:00
steve-chavez
3d55f77bae
Revert "fix: slow responses on schema cache reload"
...
This reverts commit 727ef465c1 .
Also documents requests waiting for the schema cache.
2024-04-02 23:15:09 -05:00
steve-chavez
2543b8d724
fix: clarify PGRST204 error message
2024-04-01 19:03:14 -05:00
Laurence Isla
428a6fef63
fix: in-db config values not loading for pgrst.server_trace_header and pgrst.server_cors_allowed_origins
2024-03-27 15:59:35 -05:00
steve-chavez
941ea0f929
test: notify do nothing
2024-03-19 13:22:51 +03:30
steve-chavez
ee8b3ef8fe
fix: log on LISTEN notification
2024-03-19 13:22:51 +03:30
steve-chavez
727ef465c1
fix: slow responses on schema cache reload
2024-03-15 11:53:29 -05:00
steve-chavez
11d8da046c
fix: incorrect /ready response on slow schema load
2024-03-15 11:03:01 -05:00