Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Vladimir Rusinov <vrusinov(at)google(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, David Steele <david(at)pgmasters(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Cynthia Shang <cynthia(dot)shang(at)crunchydata(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal
Date: 2017-01-27 02:23:18
Message-ID: CAB7nPqSm=PNSe3EfvnEResdFzpQMcXXgapFBcF=EFdxVW4=fDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 27, 2017 at 2:21 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Jan 24, 2017 at 4:47 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> But I don't see any proposals to actually change all uses of "xlog" to
>>> "wal". What about program names, command line options, etc.? If the
>>> argument is, we changed one thing, we should change the rest, then let's
>>> see that. I think that argument itself is flawed, but if that's what
>>> we're going with, let's see the whole plan.
>>
>> I'm happy to go change every last bit of it. I was expecting after I
>> committed the initial rename that somebody would provide a follow-on
>> patch to do the rest of it in short order. Instead, months went by
>> and we still don't have a complete patch. But I don't see why that
>> has to take more than a day's work, probably just a few hours. I'd
>> like to do that and move on.
>
> And here are patches for that.
> 0001 renames everything that contains "xlog" in pg_proc.h to refer to "wal".
> 0002 renames programs whose names contains "xlog".
> 0003 renames the dtrace probes whose names contain "xlog".
> 0004 renames command line options which contain "xlog".
>
> There are probably a few more things that could be done afterwards to
> clean up other odds and ends, but I think this gets the vast bulk of
> the user-visible references to xlog.

Thanks for doing this work. Jumping on the train, here is a review for
those patches. All of them are very mechanical changes. Just:
-<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
+<!ENTITY pgwaldump SYSTEM "pg_waldump.sgml">
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
A nit about the number of spaces here.

In protocol.sgml:
<varlistentry>
<term>
<literal>xlogpos</literal> (<type>text</type>)
</term>
<listitem>
<para>
Current xlog flush location. Useful to get a known location in the
transaction log where streaming can start.
</para>
</listitem>
</varlistentry>
You want to say WAL here instead of xlog.

In storage.sgml, similar thing:
<row>
<entry>pd_lsn</entry>
<entry>PageXLogRecPtr</entry>
<entry>8 bytes</entry>
<entry>LSN: next byte after last byte of xlog record for last change
to this page</entry>
</row>
s/xlog/WAL/

In pg_standby.c:
pg_standby.c: printf(" %s [OPTION]... ARCHIVELOCATION NEXTWALFILE
XLOGFILEPATH [RESTARTWALFILE]\n", progname);
s/XLOGFILEPATH/WALFILEPATH/.

All the other references to "xlog" are in the code comments, for the
user-facing changes your set of patches is enough.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-01-27 02:24:16 Re: [COMMITTERS] pgsql: Check interrupts during hot standby waits
Previous Message Amit Kapila 2017-01-27 02:13:23 Re: Parallel Index Scans