Commit Graph

10 Commits

Author SHA1 Message Date
John Hampton
6c9b34f0b1 fix(postgres): fix pg_isready issue with empty listen_addresses
This commit resolves the issue where `pg_isready` would fail when
`socketDir` is set and `listen_addresses` is empty. `pg_isready` is now
modified to leverage `socketDir` when it is available.
2024-04-14 08:57:42 +05:30
Shivaraj B H
18d5c1d168
fix(postgres): empty socketDir by default (#160)
resolves #139 

> empty `unix_socket_directories` means not listening on any Unix-domain sockets, in which case only TCP/IP sockets can be used to connect to the server.

see: https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES

* use TCP/IP by default for health check
2024-03-26 18:44:11 +05:30
Shivaraj B H
18f9decf13
refactor(postgres): replace string argument with attrset for connectionURI (#146)
for justification, see:
https://github.com/juspay/services-flake/pull/143#discussion_r1521290361
2024-03-13 00:40:13 +05:30
Shivaraj B H
8c25972cfb
feat(postgres): add connectionURI option (#143)
resolves #141
2024-03-12 14:24:28 +05:30
John A. Lotoski
1a3f2d1936
postgres: add socketDir option (#77) 2024-01-18 23:10:16 +05:30
Shivaraj B H
bf3a582502
[Postgres]: Fix test process not starting (#78)
* needn't copy depends_on option, demonstrated in example/flake.nix

* postgres: test process must depend on both pg1 and pg2
2024-01-18 11:28:15 +05:30
Shivaraj B H
62e13715f8
[Postgres]: Use schemas in-place of initialDumps (#73)
* (postgres) rename schema to schemas; rm initialDumps, use schemas instead
2024-01-13 22:48:46 +05:30
Rohit Singh
2211042f3e
Postgres: Added option depends_on (#71)
* Added option depends_on which will be useful to append extra depends_on configuration to the <name>-init process.

* more meaningful `depends_on` option's description

---------

Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2023-12-28 20:44:32 +05:30
Rohit Singh
d6b73e401e
Adding option initialDumps to Postgres (#67)
---------

Co-authored-by: Shivaraj B H <sbh69840@gmail.com>
2023-12-26 15:15:32 +05:30
Rohit Singh
22e121b246
Using psql command instead of postgres in initialScript (#66)
* Use psql instead of postgres, as a result, use `pg_ctl` to temporarily start the postgres server in `${name}-init` process.
* Avoid creating a custom `postgresPkg` with extensions by using `apply` attribute provided by `mkOption`
* Refactor setup script, use `writeShellApplication` and resolve shell-check errors

---------

Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2023-12-25 00:35:03 +05:30