action-setup-postgres icon indicating copy to clipboard operation
action-setup-postgres copied to clipboard

Use a system-wide pg_service.conf

Open ikalnytskyi opened this issue 1 year ago • 0 comments

The connection service file allows libpq connection parameters to be associated with a single service name. Service names can be defined in either a per-user service file or a system-wide file. If the same service name exists in both the user and the system file, the user file takes precedence.

Not being experienced enough with service files, I went with a per-user service file initially, stored in non-default location. This means action users cannot easily supply its own service file without overwriting environment variables or modifying the service file supplied by this action.

It seems more reasonable to have a system-wide service file located at the default location, rather than supply a per-user one and configure PGSERVICEFILE to point to the latter. Additionally, it may help to bypass crashes in third party applications which are not ready for PGSERVICEFILE being set (e.g. dbmate).

Fixes: #40

ikalnytskyi avatar Jul 05 '24 13:07 ikalnytskyi