3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #283080 from marsam/postgresql-test-hook-settings

postgresqlTestHook: add postgresqlExtraSettings variable
This commit is contained in:
Mario Rodas 2024-02-04 06:36:16 -05:00 committed by GitHub
commit 1be8478d00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -45,6 +45,7 @@ Bash-only variables:
- `postgresqlTestSetupCommands`: bash commands to run after database start, defaults to running `$postgresqlTestSetupSQL` as database administrator.
- `postgresqlEnableTCP`: set to `1` to enable TCP listening. Flaky; not recommended.
- `postgresqlStartCommands`: defaults to `pg_ctl start`.
- `postgresqlExtraSettings`: Additional configuration to add to `postgresql.conf`
## Hooks {#sec-postgresqlTestHook-hooks}

View file

@ -56,6 +56,8 @@ EOF
echo 'initializing postgresql'
initdb -U postgres
echo "$postgresqlExtraSettings" >>"$PGDATA/postgresql.conf"
# Move the socket
echo "unix_socket_directories = '$NIX_BUILD_TOP/run/postgresql'" >>"$PGDATA/postgresql.conf"