Typo in xlogfuncs.c [WAS Re: Incorrect mention of pg_xlog_switch() in xlogfuncs.c]
Simplifying $subject. There are typos in xlogfuncs.c. So Either
s/pg_xlog_switch/pg_switch_wal
Or
Remove "pg_xlog_switch" from the comments.
Attached patches both ways.
Regards,
Neha
On Sat, May 20, 2017 at 1:08 AM, Neha Khatri <nehakhatri5@gmail.com> wrote:
Show quoted text
While reading some code, noticed that the headers of functions
pg_walfile_name_offset() and pg_walfile_name() incorrecty refer
pg_xlog_switch() since the inception of code in commit 704ddaaa.In PG10 implementation, actual name of the referred function is
pg_switch_wal(). So either refer the correct name in the function
header or remove the other function referral from the function header.
Attachments:
remove_incorrect_function_referral.patchapplication/octet-stream; name=remove_incorrect_function_referral.patchDownload
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index b3223d6..463f668 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -448,8 +448,7 @@ pg_last_wal_replay_lsn(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an xlog file name and decimal byte offset given a WAL location.
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
@@ -514,8 +513,7 @@ pg_walfile_name_offset(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an xlog file name given a WAL location.
*/
Datum
pg_walfile_name(PG_FUNCTION_ARGS)
correctly_refer_pg_switch_wal.patchapplication/octet-stream; name=correctly_refer_pg_switch_wal.patchDownload
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index b3223d6..fb905c0 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -449,7 +449,7 @@ pg_last_wal_replay_lsn(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
@@ -515,7 +515,7 @@ pg_walfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
pg_walfile_name(PG_FUNCTION_ARGS)
On 5/31/17 19:59, Neha Khatri wrote:
Simplifying $subject. There are typos in xlogfuncs.c. So Either
s/pg_xlog_switch/pg_switch_wal
fixed
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers