Re: Should pg_current_wal_location() become pg_current_wal_lsn()

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should pg_current_wal_location() become pg_current_wal_lsn()
Date: 2017-05-01 12:10:43
Message-ID: CAKJS1f8PadYT90CBYh9d+UXZxeo0jFOJYL3_RD+v1mBgLOmfFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 April 2017 at 07:29, Euler Taveira <euler(at)timbira(dot)com(dot)br> wrote:
> 2017-04-19 1:32 GMT-03:00 Michael Paquier <michael(dot)paquier(at)gmail(dot)com>:
>>
>> I vote for "location" -> "lsn". I would expect complains about the
>> current inconsistency at some point, and the function names have been
>> already changed for this release..

OK, so I've created a draft patch which does this.

In summary of what it does

1. Renames all wal_location functions to wal_lsn.
2. Renames all system view columns to use "lsn" instead of "location"
3. Rename function parameters to use "lsn" instead of "location".
4. Rename function parameters "wal_position" to "lsn". (Not mentioned
before, but seems consistency was high on the list from earlier
comments on the thread)
5. Change documentation to reflect the above changes.
6. Fix bug where docs claimed return type of
pg_logical_slot_peek_changes.location was text, when it was pg_lsn
(maybe apply separately?)
7. Change some places in the func.sgml where it was referring to the
lsn as a "position" rather than "location". (We want consistency here)

Is this touching all places which were mentioned by everyone?

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
location2lsn_rename.patch application/octet-stream 60.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-05-01 12:12:51 Re: SCRAM in the PG 10 release notes
Previous Message Robert Haas 2017-05-01 12:02:46 Re: PG 10 release notes