On 02/27/2017 03:05 PM, Peter Eisentraut wrote:
How about changing the default for log_directory from 'pg_log' to, say, 'log'?
I have attached a patch which does this. I do not care much about which name is picked as long as we get rid off the "pg_" prefix.
Btw, is there a reason for why global and base do not have the "pg_" prefix? Andreas
commit 0b71fcdb328f05349775675e0491ba1b82127d4e Author: Andreas Karlsson <andr...@proxel.se> Date: Mon Mar 6 23:52:49 2017 +0100 Rename default log directory from pg_log to log diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index cd82c04b05..4ee1f605bc 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4324,8 +4324,8 @@ SELECT * FROM parent WHERE key = 2400; find the logs currently in use by the instance. Here is an example of this file's content: <programlisting> -stderr pg_log/postgresql.log -csvlog pg_log/postgresql.csv +stderr log/postgresql.log +csvlog log/postgresql.csv </programlisting> <filename>current_logfiles</filename> is recreated when a new log file @@ -4427,7 +4427,7 @@ local0.* /var/log/postgresql cluster data directory. This parameter can only be set in the <filename>postgresql.conf</> file or on the server command line. - The default is <literal>pg_log</literal>. + The default is <literal>log</literal>. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/file-fdw.sgml b/doc/src/sgml/file-fdw.sgml index 309a303e03..359f222352 100644 --- a/doc/src/sgml/file-fdw.sgml +++ b/doc/src/sgml/file-fdw.sgml @@ -262,7 +262,7 @@ CREATE FOREIGN TABLE pglog ( location text, application_name text ) SERVER pglog -OPTIONS ( filename '/home/josh/9.1/data/pg_log/pglog.csv', format 'csv' ); +OPTIONS ( filename '/home/josh/9.1/data/log/pglog.csv', format 'csv' ); </programlisting> </para> diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 0707f66631..69b9cdacff 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -3298,7 +3298,7 @@ static struct config_string ConfigureNamesString[] = GUC_SUPERUSER_ONLY }, &Log_directory, - "pg_log", + "log", check_canonical_path, NULL, NULL }, { diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 157d775853..e6dbc31591 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -343,7 +343,7 @@ # (change requires restart) # These are only used if logging_collector is on: -#log_directory = 'pg_log' # directory where log files are written, +#log_directory = 'log' # directory where log files are written, # can be absolute or relative to PGDATA #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, # can include strftime() escapes diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index e5cb348f4c..1c87e39e0d 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -560,7 +560,7 @@ sub _backup_fs $backup_path, filterfn => sub { my $src = shift; - return ($src ne 'pg_log' and $src ne 'postmaster.pid'); + return ($src ne 'log' and $src ne 'postmaster.pid'); }); if ($hot) diff --git a/src/test/perl/RecursiveCopy.pm b/src/test/perl/RecursiveCopy.pm index 3e98813286..457488ba5b 100644 --- a/src/test/perl/RecursiveCopy.pm +++ b/src/test/perl/RecursiveCopy.pm @@ -48,9 +48,9 @@ attempted. RecursiveCopy::copypath('/some/path', '/empty/dir', filterfn => sub { - # omit pg_log and contents + # omit log and contents my $src = shift; - return $src ne 'pg_log'; + return $src ne 'log'; } );
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers