test: negative pgrst_db_pool_available in metrics

Proves the failure on https://github.com/PostgREST/postgrest/issues/4622.

This doesn't require additional test infra, only nginx. Taking advantage
of the `stream {}` context which is also compatible with unix socket
besides TCP.
This commit is contained in:
steve-chavez
2026-05-20 10:29:12 -05:00
committed by Steve Chavez
parent ae1e3d6c4d
commit 0be41a4941
5 changed files with 90 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
# the PG* variables are replaced by preprocessing, not done by nginx itself
daemon off;
pid ./nginx.pid;
events {}
stream {
server {
listen unix:$PGPROXYHOST/.s.PGSQL.5432;
proxy_timeout $PGPROXY_TIMEOUT;
proxy_pass unix:$PGHOST/.s.PGSQL.5432;
}
}