createdb feature request

From: Mark Harrison <mh(at)pixar(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: createdb feature request
Date: 2004-02-11 19:49:54
Message-ID: 402A8762.10008@pixar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Apache has a nice feature: it creates copies of all the default
configuration files, so that it's easy to diff and see what has
been modified in the config files.

Can this be included in createdb as well?

Thanks,
Mark

Here's a patch:

*** initdb.sh-orig 2004-02-11 11:25:49.000000000 -0800
--- initdb.sh 2004-02-11 11:28:35.000000000 -0800
***************
*** 608,615 ****
--- 608,620 ----
fi
cp "$PG_IDENT_SAMPLE" "$PGDATA"/pg_ident.conf || exit_nicely

+ cp "$PGDATA"/pg_ident.conf "$PGDATA"/pg_ident.conf.default || exit_nicely
+ cp "$PGDATA"/pg_hba.conf "$PGDATA"/pg_hba.conf.default || exit_nicely
+ cp "$PGDATA"/postgresql.conf "$PGDATA"/postgresql.conf.default || exit_nicely
chmod 0600 "$PGDATA"/pg_hba.conf "$PGDATA"/pg_ident.conf \
"$PGDATA"/postgresql.conf
+ chmod 0600 "$PGDATA"/pg_hba.conf.default "$PGDATA"/pg_ident.conf.default \
+ "$PGDATA"/postgresql.conf.default

echo "ok"

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-02-11 20:18:13 Re: DB cache size strategies
Previous Message th240265 2004-02-11 19:19:53 PostgreSQL in a shared-disk enviroment