You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each new server, I have to edit pg_hba.conf and postgresql.conf and add very similar entries. Is it possible to add a feature to the app to store config templates and apply them to configurations?
IMHO, templates would be more viable than copying configurations, because different PostgreSQL Server versions may have different options and default values in the future.
For example, PostgresApp may store config template entries as key-value pairs and whether they should be overridden.
{postgres.conf: {listen_addresses: {value: "*",overwrite: true},max_connections: {value: 100,overwrite: false}},// For `pg_hba.conf`, if overwrite is true it erases all entries, otherwise, just add entries above the current ones.pg_hba.conf: {overwrite: true,value: ["local replication all trust","host replication all 127.0.0.1/32 trust","host replication all ::1/128 trust",]}
The text was updated successfully, but these errors were encountered:
While there isn't currently a customisable templating mechanism in Postgres.app, you may already alter the defaults used to initialise new clusters per PostgreSQL version within Postgres.app:
You can edit the files postgresql.conf.sample and pg_hba.conf.sample found in /Applications/Postgres.app/Contents/Versions/15/share/postgresql/ (or the corresponding directories for other versions) which are used as templates during initdb. When doing so, please note that you need to start Postgres.app at least once before to pass the Gatekeeper checks as any modification will likely break the code signature. Also, this kind of modifications need to be repeated after updates of the application.
Further, I'd recommend to have a look to the ALTER SYSTEM SQL command which allows to modify GUCs via the SQL interface that overrides configuration from postgresql.conf. These changes are also dumped by pg_dumpall -g.
Hi,
For each new server, I have to edit
pg_hba.conf
andpostgresql.conf
and add very similar entries. Is it possible to add a feature to the app to store config templates and apply them to configurations?IMHO, templates would be more viable than copying configurations, because different PostgreSQL Server versions may have different options and default values in the future.
For example, PostgresApp may store config template entries as key-value pairs and whether they should be overridden.
The text was updated successfully, but these errors were encountered: