Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal

From: Vladimir Rusinov <vrusinov(at)google(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, David Steele <david(at)pgmasters(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(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-09 15:50:37
Message-ID: CAE1wr-wZGO-kJFyq3TWO75XyZuetFXqioUuYGuJ58+Z++bx+fw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Fri, Jan 6, 2017 at 12:44 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> > - OIDs - where do I get numbers from? I was kinda choosing them at
> random,
> > unaware if there is some process for keeping track of them. Please point
> me
> > if such thing exists and I'll change them.
>
> You can use src/include/catalog/unused_oids to look at the OIDs not
> yet assigned. Assigning them logically increasing may be a good idea.
> But OID ordering is not that mandatory for the internal functions and
> operators.
>

Thanks, that's useful tip.
Looks like I am fine, although I could have reused some lower numbers.

> > - New function names. I've used 'recovery' instead of 'xlog_replay'
>
> I would not have touched this one. But if we go this way, let's
> bike-shed and use pg_recovery_ as prefix for consistency.
>

Makes sense, renamed those to wal_replay.

> > - Release notes. I was unable to find a draft for 10.0. How do I make
> sure
>
> these renames are not forgotten?
>
> That's part of the job of the release note writer, very likely Tom or
> Bruce. The commit message should be explicit enough that the writer
> does not have to dig into the code itself for the changes.
>

I see. Attached patch is just a output of 'git diff master' and does not
contain message since I've messed up squashing, but here's the commit
message I intended to use (feel free to reuse fully or partially, beware
that I have probably messed up grammar, so somebody who actually knows
English should review):

Remove 'xlog' references from admin functions.

After 'pg_xlog' has been renamed to 'pg_wal' 'xlog' reference in
function names is confusing.
This change renames 'xlog' in function names to 'wal', keeping old
function names as aliases.

Following functions have been renamed:

Name | Replaced by
--------------------------------|-------------------------------
pg_current_xlog_flush_location | pg_current_wal_flush_location
pg_current_xlog_insert_location | pg_current_wal_insert_location
pg_current_xlog_location | pg_current_wal_location
pg_is_xlog_replay_paused | pg_is_recovery_paused
pg_last_xlog_receive_location | pg_last_wal_receive_location
pg_last_xlog_replay_location | pg_last_wal_replay_location
pg_switch_xlog | pg_switch_wal
pg_xlog_location_diff | pg_wal_location_diff
pg_xlog_replay_pause | pg_wal_replay_pause
pg_xlog_replay_resume | pg_wal_replay_resume
pg_xlogfile_name | pg_wal_file_name
pg_xlogfile_name_offset | pg_wal_file_name_offset

--
Vladimir Rusinov
Storage SRE, Google Ireland

Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047

Attachment Content-Type Size
0002-Remove-xlog-references-from-admin-functions.patch text/x-patch 70.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-01-09 16:02:01 Re: Replication/backup defaults
Previous Message Tom Lane 2017-01-09 15:17:20 Re: Increase pltcl test coverage