Thread: [HACKERS] rename pg_log directory?

[HACKERS] rename pg_log directory?

From
Peter Eisentraut
Date:
How about changing the default for log_directory from 'pg_log' to, say,
'log'?

We have been emphasizing that the prefix "pg_" is for things reserved to
PostgreSQL, whereas the pg_log directory is entirely an arbitrary
user-space name.  Also, with a different name, the directory would stand
out more between all the other pg_* directories in the data directory.

Obviously, users could set the name back to the old one if they want.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: [HACKERS] rename pg_log directory?

From
David Fetter
Date:
On Mon, Feb 27, 2017 at 09:05:16AM -0500, Peter Eisentraut wrote:
> How about changing the default for log_directory from 'pg_log' to, say,
> 'log'?

+1

A lot of work has already gone into this release to clarify what
things are PostgreSQL internals and which ones are not.  This will
help.

Yes, monitoring tools will need to take this into account.  The people
this will help will be the majority of our users, namely people who
have yet to adopt PostgreSQL[1].

Best,
David.

[1]  The project could fail completely next week, making our past and
current users could be the majority, but that would be very sad.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



Re: [HACKERS] rename pg_log directory?

From
Tom Lane
Date:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> How about changing the default for log_directory from 'pg_log' to, say,
> 'log'?

> We have been emphasizing that the prefix "pg_" is for things reserved to
> PostgreSQL, whereas the pg_log directory is entirely an arbitrary
> user-space name.  Also, with a different name, the directory would stand
> out more between all the other pg_* directories in the data directory.

No objection to the basic point, but "log" seems perhaps a little too
generic to me.  Would something like "server_log" be better?
        regards, tom lane



Re: [HACKERS] rename pg_log directory?

From
Bruce Momjian
Date:
On Mon, Feb 27, 2017 at 09:51:26AM -0500, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> > How about changing the default for log_directory from 'pg_log' to, say,
> > 'log'?
> 
> > We have been emphasizing that the prefix "pg_" is for things reserved to
> > PostgreSQL, whereas the pg_log directory is entirely an arbitrary
> > user-space name.  Also, with a different name, the directory would stand
> > out more between all the other pg_* directories in the data directory.
> 
> No objection to the basic point, but "log" seems perhaps a little too
> generic to me.  Would something like "server_log" be better?

"activity_log"?  I like the idea of a rename.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



Re: [HACKERS] rename pg_log directory?

From
Magnus Hagander
Date:


On Tue, Feb 28, 2017 at 4:01 AM, Bruce Momjian <bruce@momjian.us> wrote:
On Mon, Feb 27, 2017 at 09:51:26AM -0500, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> > How about changing the default for log_directory from 'pg_log' to, say,
> > 'log'?
>
> > We have been emphasizing that the prefix "pg_" is for things reserved to
> > PostgreSQL, whereas the pg_log directory is entirely an arbitrary
> > user-space name.  Also, with a different name, the directory would stand
> > out more between all the other pg_* directories in the data directory.
>
> No objection to the basic point, but "log" seems perhaps a little too
> generic to me.  Would something like "server_log" be better?

"activity_log"?  I like the idea of a rename.

server_log seems like a better choice then I think. So +1 for that.

In theory cluster_log since it's a "cluster level log", but given how many people already get confused by the term cluster being used that way, I think that while maybe technically correct, that would be a very bad choice. 


--

Re: [HACKERS] rename pg_log directory?

From
Jorge Solórzano
Date:
On Tue, Feb 28, 2017 at 5:07 AM, Magnus Hagander <magnus@hagander.net> wrote:

server_log seems like a better choice then I think. So +1 for that.

​server_log +1

 

In theory cluster_log since it's a "cluster level log", but given how many people already get confused by the term cluster being used that way, I think that while maybe technically correct, that would be a very bad choice. 
 

Re: [HACKERS] rename pg_log directory?

From
Peter Eisentraut
Date:
On 2/27/17 09:51, Tom Lane wrote:
> No objection to the basic point, but "log" seems perhaps a little too
> generic to me.  Would something like "server_log" be better?

Well, "log" is pretty well established.  There is /var/log, and if you
unpack a, say, Kafka or Cassandra distribution, they also come with a
log or logs directory.


-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: [HACKERS] rename pg_log directory?

From
Peter Eisentraut
Date:
On 2/28/17 06:07, Magnus Hagander wrote:
> server_log seems like a better choice then I think. So +1 for that.
> 
> In theory cluster_log since it's a "cluster level log", but given how
> many people already get confused by the term cluster being used that
> way, I think that while maybe technically correct, that would be a very
> bad choice. 

Well, the premise was that we wanted to rename xlog because people think
that the "log" is "the log".  So there should be no confusion if there
is only one "log" left.  (cough, cough, clog, cough, cough)  I think if
we invent nonstandard names, it will be more confusing, not less.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: [HACKERS] rename pg_log directory?

From
Andreas Karlsson
Date:
On 03/01/2017 05:49 AM, Peter Eisentraut wrote:
> On 2/27/17 09:51, Tom Lane wrote:
>> No objection to the basic point, but "log" seems perhaps a little too
>> generic to me.  Would something like "server_log" be better?
>
> Well, "log" is pretty well established.  There is /var/log, and if you
> unpack a, say, Kafka or Cassandra distribution, they also come with a
> log or logs directory.

+1, though I am also fine with server_log.

Andreas




Re: [HACKERS] rename pg_log directory?

From
Tom Lane
Date:
Andreas Karlsson <andreas@proxel.se> writes:
> On 03/01/2017 05:49 AM, Peter Eisentraut wrote:
>> On 2/27/17 09:51, Tom Lane wrote:
>>> No objection to the basic point, but "log" seems perhaps a little too
>>> generic to me.  Would something like "server_log" be better?

>> Well, "log" is pretty well established.  There is /var/log, and if you
>> unpack a, say, Kafka or Cassandra distribution, they also come with a
>> log or logs directory.

> +1, though I am also fine with server_log.

FWIW, I'm not strongly advocating for "server_log", I just thought it
was worth having some discussion around the name.  Peter's point above
is pretty good though.
        regards, tom lane



Re: [HACKERS] rename pg_log directory?

From
Andreas Karlsson
Date:
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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

Re: [HACKERS] rename pg_log directory?

From
Bruce Momjian
Date:
On Tue, Mar  7, 2017 at 12:01:04AM +0100, Andreas Karlsson wrote:
> 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?

"data" and "base" where chosen because it is a "data-base", but with the
pg_ prefixes it would be a pg_data_pg_base.  ;-)

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



Re: [HACKERS] rename pg_log directory?

From
Andreas Karlsson
Date:
On 03/09/2017 11:25 PM, Bruce Momjian wrote:
> "data" and "base" where chosen because it is a "data-base", but with the
> pg_ prefixes it would be a pg_data_pg_base.  ;-)

Haha, I had not spotted that one despite always naming my data directory 
"data" while developing. Fun little tidbit there.

Andreas



Re: [HACKERS] rename pg_log directory?

From
Bruce Momjian
Date:
On Fri, Mar 10, 2017 at 11:23:54AM +0100, Andreas Karlsson wrote:
> On 03/09/2017 11:25 PM, Bruce Momjian wrote:
> >"data" and "base" where chosen because it is a "data-base", but with the
> >pg_ prefixes it would be a pg_data_pg_base.  ;-)
> 
> Haha, I had not spotted that one despite always naming my data directory
> "data" while developing. Fun little tidbit there.

Yeah, we can thank the creative Berkeley students for that one, I think.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



Re: rename pg_log directory?

From
Peter Eisentraut
Date:
On 3/6/17 18:01, Andreas Karlsson wrote:
> 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.

Committed.

While digging around a bit, I found in release-old.sgml that before
PostgreSQL 7.2, pg_clog was called pg_log.  Go figure.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: rename pg_log directory?

From
Andreas Karlsson
Date:
On 03/27/2017 04:38 PM, Peter Eisentraut wrote:
> Committed.

Thanks!

> While digging around a bit, I found in release-old.sgml that before
> PostgreSQL 7.2, pg_clog was called pg_log.  Go figure.

Yeah, I noticed that too when writing the patch. :)

Andreas