- the isExecutable patch was broken, remove it
- the ncurses fix was broken, we still need `enableStatic`
- the original error was caused by the new ghc-bignum
package, which isn't a "proper" Haskell package; we filter
this out explicitly now
This patches static-haskell-nix to work for building postgrest
with updated nixpkgs (from ~202203):
- The ncurses 'enableStatic' argument doesn't exist anymore.
We use the vanilla package instead, which seems to work fine.
- The 'isExecutable' check fails with a strange error related
to trying to override 'mkDerivation'.
We patch 'isExecutable' to check explicitly whether we're building
postgrest. ('isExecutable' is used to determine whether to build
a package statically.)
Fixes https://github.com/PostgREST/postgrest/issues/1512
Helps on environments where you can't send unix signals(Windows, managed
containers). Also provides better UX for schema reloads - NOTIFY
can be sent from pg clients(psql, pgadmin).
`NOTIFY pgrst` - with no payload - should be done to reload the schema cache.
Notifications with a payload will be ignored.
The channel can be enabled with `db-channel-enabled`(false by default)
and its name can be configured with `db-channel`.
The LISTEN thread uses a dedicated pg connection.
This connection is recovered if it fails.
A debounce of 1ms is done in case too many NOTIFYs arrive.