Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal
Дата
Msg-id CA+TgmobeHP2qbtMvYxG2x8Pm_9utjRya-rom5XL4QuyA26c1Gg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal  (Vladimir Rusinov <vrusinov@google.com>)
Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal  (Stephen Frost <sfrost@snowman.net>)
Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Jan 16, 2017 at 10:48 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> If we do that, we should vote on all the "renaming" stuff, i.e., not only
> function names but also program names like pg_receivexlog, directory names
> like clog, option names like xlogdir option of initdb, return value names of
> the functions like xlog_position in pg_create_physical_replication_slot, etc.

Right.  I think a lot of that stuff should also be changed.  If we
weren't OK with breaking compatibility, why'd we change pg_xlog ->
pg_wal?  If we're not willing to change other things to match, let's
revert that change and be done with it.  It's undeniable that there's
going to be some pain here and I'm not committed to incurring that
pain, but I don't really understand the the theory that saying that a
half-renaming will save us pain vs. a more through renaming.  If we
change some things and not others, people will have to try to remember
in which cases they now have to say xlog instead of wal and in which
cases they still have to say xlog and (perhaps) in which cases they
can choose either.  I think "xlog" is terrible naming; there is no
universe in which "x" is a reasonable short-hand for either
"transaction" or "write-ahead".

Q: OK, where is my WAL stored?
A: pg_wal
Q: How do I reset it?
A: pg_resetxlog
Q: Why is it called pg_resetxlog?
A: Because we call the transaction log "xlog".
Q: Evidently you don't.
A: Well, it used to be called pg_xlog prior to version 10, but then we
renamed it, but the tool has still got the old name.
Q: Are you kidding me?
A: No.
Q: Do you guys suck at picking names for things?
A: Yes.
Q: Wouldn't it at least be better to settle on ONE incomprehensible
abbreviation for any given concept instead of having TWO DIFFERENT
ONES?
A: Hey, look at the time.

If we don't make this all consistent, we'll be having that
conversation -- or some variant of it -- forever.  There will be
constant arguments about whether to give in and rename some more
things.  The people who are now saying that we shouldn't break
compatibility for this change (as if we haven't already) will be even
less happy when they keep having to argue against breaking
compatibility for the same thing a second time.

I'm OK with continuing to use "xlog" as the user-facing name for the
write-ahead log, and I am OK with switching to wal.  But leaving
things in the halfway in-between state where they are right now seems
like a mess.  It conveniences the people who happen to care about the
names of the parts we haven't renamed yet but not the part we already
did rename at the price of a permanent inconsistency in naming
conventions that can't ever eliminate.  Yuck.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gilles Darold
Дата:
Сообщение: Re: [HACKERS] Patch to implement pg_current_logfile() function
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal