postgresqlTestHook: add postgresqlExtraSettings variable

Add `postgresqlExtraSettings` to allow to setup the `postgresql.conf`.
This would be useful in cases where we need to set
`shared_preload_libraries`.

Changed files
+3
doc
pkgs
build-support
setup-hooks
postgresql-test-hook
+1
doc/hooks/postgresql-test-hook.section.md
···
- `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}
+2
pkgs/build-support/setup-hooks/postgresql-test-hook/postgresql-test-hook.sh
···
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"