From aa75412932da8cb19dc35585bc2d8882ca7d7ec1 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Fri, 17 May 2024 19:03:15 -0500 Subject: [PATCH] nix: PGRST_DB_URI preference for tmp db replica When using `postgrest-with-postgresql-* --replica`, the PGRST_DB_URI will set the replica host as preference. This to be able to run quick manual tests with postgrest running on a replica. --- nix/tools/withTools.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/tools/withTools.nix b/nix/tools/withTools.nix index 4cda526ce..40f44ea97 100644 --- a/nix/tools/withTools.nix +++ b/nix/tools/withTools.nix @@ -106,6 +106,7 @@ let export PGREPLICAHOST="$replica_host" export PGREPLICASLOT="$replica_slot" + export PGRST_DB_URI="postgres:///$PGDATABASE?host=$PGREPLICAHOST,$PGHOST" fi # shellcheck disable=SC2317