I've reworked the unshare parts from #23 so that we test once on initialization that unshare is useable when running as root on Linux. This should avoid any cryptic errors when unshare is unavailable.
I've also reworked the runner to execute the postgres binary directly as opposed to being backgrounded by pg_ctl. This has the advantage of preventing orphan postgres in the event that cleanup fails as the postgres process should effectively be a child of the java module which would get killed at the same time as the java module.
I've reworked the
unshare
parts from #23 so that we test once on initialization thatunshare
is useable when running as root on Linux. This should avoid any cryptic errors whenunshare
is unavailable.I've also reworked the runner to execute the
postgres
binary directly as opposed to being backgrounded bypg_ctl
. This has the advantage of preventing orphanpostgres
in the event that cleanup fails as thepostgres
process should effectively be a child of the java module which would get killed at the same time as the java module.