Incorrect mention of pg_xlog_switch() in xlogfuncs.c
Started by Neha Khatriover 8 years ago1 messages
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.
Attaching patches for both the ways.
--
Regards,
Neha
Attachments:
remove_incorrect_function_referral.patchtext/x-patch; charset=US-ASCII; 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.patchtext/x-patch; charset=US-ASCII; 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)