Re: pg_xlog -> pg_xjournal?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
Cc: Joel Jacobson <joel(at)trustly(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_xlog -> pg_xjournal?
Date: 2015-06-10 23:10:17
Message-ID: CAMkU=1z+YJbsevbXSAfidEO52DDmDLK3X43G4E5awYq6dHa+yw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 2, 2015 at 2:45 AM, Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz
> wrote:

> On 01/06/15 05:29, Joel Jacobson wrote:
>
>> While anyone who is familiar with postgres would never do something as
>> stupid as to delete pg_xlog,
>> according to Google, there appears to be a fair amount of end-users out
>> there having made the irrevocable mistake of deleting the precious
>> directory,
>> a decision made on the assumption that since "it has *log* in the name
>> so it must be unimportant"
>> (
>> http://stackoverflow.com/questions/12897429/what-does-pg-resetxlog-do-and-how-does-it-work
>> ).
>>
>> If we could turn back time, would we have picked "pg_xlog" as the most
>> optimal name for this important directory, or would we have come up with
>> a more user-friendly name?
>>
>> Personally, I have never had any problems with pg_xlog, but I realize
>> there are quite a few unlucky new users who end up in trouble.
>>
>> My suggestion is to use "pg_xjournal" instead of "pg_xlog" when new
>> users create a new data directory using initdb, and allow for both
>> directories to exist (exclusive or, i.e. either one or the other, but
>> not both). That way we don't complicate the life for any existing users,
>> all their tools will continue to work who rely on pg_xlog to be named
>> pg_xlog, but only force new users to do a bit of googling when they
>> can't use whatever tool that can't find pg_xlog. When they find out it's
>> an important directory, they can simply create a symlink and their old
>> not yet updated tool will work again.
>>
>> Thoughts?
>>
>>
> +1
>
> Strongly agree - I have had people on my dba course ask about deleting
> these pesky 'log' directories (obvious confusion/conflation with pg_log
> ...)! A change of name would help reduce the temptation!
>
>
Why is it named pg_log by default anyway? While base and global are not
named pg_base (or pg_default) and pg_global ?

If we are going to break things in some release, maybe we should rename
them all to have a little more rhyme or reason to them. Or is there
already a rhyme or reason I am overlooking?

I would think all the config and human-readable log files/directories
should have one prefix (or absence of prefix), and all the internal
files/directories with no user serviceable parts should have a different
one.

Cheers,

Jeff

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-06-10 23:19:27 Refactoring speculative insertion with unique indexes a little
Previous Message Josh Berkus 2015-06-10 22:08:29 Re: jsonb - path