Commit 3371e4d9 authored by Peter Eisentraut's avatar Peter Eisentraut

Change default of log_directory to 'log'

The previous default 'pg_log' might have indicated by its "pg_" prefix
that it is an internal system directory.  The new default is more in
line with the typical naming of directories with user-facing log files.
Together with the renaming of pg_clog and pg_xlog, this should clear up
that difference.

Author: Andreas Karlsson <andreas@proxel.se>
parent a171f015
...@@ -4363,8 +4363,8 @@ SELECT * FROM parent WHERE key = 2400; ...@@ -4363,8 +4363,8 @@ SELECT * FROM parent WHERE key = 2400;
find the logs currently in use by the instance. Here is an example of find the logs currently in use by the instance. Here is an example of
this file's content: this file's content:
<programlisting> <programlisting>
stderr pg_log/postgresql.log stderr log/postgresql.log
csvlog pg_log/postgresql.csv csvlog log/postgresql.csv
</programlisting> </programlisting>
<filename>current_logfiles</filename> is recreated when a new log file <filename>current_logfiles</filename> is recreated when a new log file
...@@ -4466,7 +4466,7 @@ local0.* /var/log/postgresql ...@@ -4466,7 +4466,7 @@ local0.* /var/log/postgresql
cluster data directory. cluster data directory.
This parameter can only be set in the <filename>postgresql.conf</> This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line. file or on the server command line.
The default is <literal>pg_log</literal>. The default is <literal>log</literal>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
...@@ -262,7 +262,7 @@ CREATE FOREIGN TABLE pglog ( ...@@ -262,7 +262,7 @@ CREATE FOREIGN TABLE pglog (
location text, location text,
application_name text application_name text
) SERVER pglog ) SERVER pglog
OPTIONS ( filename '/home/josh/9.1/data/pg_log/pglog.csv', format 'csv' ); OPTIONS ( filename '/home/josh/data/log/pglog.csv', format 'csv' );
</programlisting> </programlisting>
</para> </para>
......
...@@ -3320,7 +3320,7 @@ static struct config_string ConfigureNamesString[] = ...@@ -3320,7 +3320,7 @@ static struct config_string ConfigureNamesString[] =
GUC_SUPERUSER_ONLY GUC_SUPERUSER_ONLY
}, },
&Log_directory, &Log_directory,
"pg_log", "log",
check_canonical_path, NULL, NULL check_canonical_path, NULL, NULL
}, },
{ {
......
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
# (change requires restart) # (change requires restart)
# These are only used if logging_collector is on: # 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 # can be absolute or relative to PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
# can include strftime() escapes # can include strftime() escapes
......
...@@ -551,7 +551,7 @@ sub _backup_fs ...@@ -551,7 +551,7 @@ sub _backup_fs
$backup_path, $backup_path,
filterfn => sub { filterfn => sub {
my $src = shift; my $src = shift;
return ($src ne 'pg_log' and $src ne 'postmaster.pid'); return ($src ne 'log' and $src ne 'postmaster.pid');
}); });
if ($hot) if ($hot)
......
...@@ -48,9 +48,9 @@ attempted. ...@@ -48,9 +48,9 @@ attempted.
RecursiveCopy::copypath('/some/path', '/empty/dir', RecursiveCopy::copypath('/some/path', '/empty/dir',
filterfn => sub { filterfn => sub {
# omit pg_log and contents # omit log/ and contents
my $src = shift; my $src = shift;
return $src ne 'pg_log'; return $src ne 'log';
} }
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment