mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Remove all references to "xlog" from SQL-callable functions in pg_proc.
Commit f82ec32ac3 renamed the pg_xlog
directory to pg_wal. To make things consistent, and because "xlog" is
terrible terminology for either "transaction log" or "write-ahead log"
rename all SQL-callable functions that contain "xlog" in the name to
instead contain "wal". (Note that this may pose an upgrade hazard for
some users.)
Similarly, rename the xlog_position argument of the functions that
create slots to be called wal_position.
Discussion: https://www.postgresql.org/message-id/CA+Tgmob=YmA=H3DbW1YuOXnFVgBheRmyDkWcD9M8f=5bGWYEoQ@mail.gmail.com
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
#
|
||||
# If recovery_target_action = 'pause', recovery will pause when the
|
||||
# recovery target is reached. The pause state will continue until
|
||||
# pg_xlog_replay_resume() is called. This setting has no effect if
|
||||
# pg_wal_replay_resume() is called. This setting has no effect if
|
||||
# no recovery target is set. If hot_standby is not enabled then the
|
||||
# server will shutdown instead, though you may request this in
|
||||
# any case by specifying 'shutdown'.
|
||||
|
||||
@@ -5870,7 +5870,7 @@ recoveryPausesHere(void)
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("recovery has paused"),
|
||||
errhint("Execute pg_xlog_replay_resume() to continue.")));
|
||||
errhint("Execute pg_wal_replay_resume() to continue.")));
|
||||
|
||||
while (RecoveryIsPaused())
|
||||
{
|
||||
|
||||
@@ -276,13 +276,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
/*
|
||||
* pg_switch_xlog: switch to next xlog file
|
||||
* pg_switch_wal: switch to next xlog file
|
||||
*
|
||||
* Permission checking for this function is managed through the normal
|
||||
* GRANT system.
|
||||
*/
|
||||
Datum
|
||||
pg_switch_xlog(PG_FUNCTION_ARGS)
|
||||
pg_switch_wal(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogRecPtr switchpoint;
|
||||
|
||||
@@ -348,7 +348,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
|
||||
* to the kernel, but is not necessarily synced to disk.
|
||||
*/
|
||||
Datum
|
||||
pg_current_xlog_location(PG_FUNCTION_ARGS)
|
||||
pg_current_wal_location(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogRecPtr current_recptr;
|
||||
|
||||
@@ -369,7 +369,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
|
||||
* This function is mostly for debugging purposes.
|
||||
*/
|
||||
Datum
|
||||
pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
|
||||
pg_current_wal_insert_location(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogRecPtr current_recptr;
|
||||
|
||||
@@ -390,7 +390,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
|
||||
* This function is mostly for debugging purposes.
|
||||
*/
|
||||
Datum
|
||||
pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
|
||||
pg_current_wal_flush_location(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogRecPtr current_recptr;
|
||||
|
||||
@@ -412,7 +412,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
|
||||
* and synced to disk by walreceiver.
|
||||
*/
|
||||
Datum
|
||||
pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
|
||||
pg_last_wal_receive_location(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogRecPtr recptr;
|
||||
|
||||
@@ -431,7 +431,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
|
||||
* connections during recovery.
|
||||
*/
|
||||
Datum
|
||||
pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
|
||||
pg_last_wal_replay_location(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogRecPtr recptr;
|
||||
|
||||
@@ -452,7 +452,7 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
|
||||
* expected usage is to determine which xlog file(s) are ready to archive.
|
||||
*/
|
||||
Datum
|
||||
pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
|
||||
pg_walfile_name_offset(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogSegNo xlogsegno;
|
||||
uint32 xrecoff;
|
||||
@@ -468,7 +468,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("recovery is in progress"),
|
||||
errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
|
||||
errhint("pg_walfile_name_offset() cannot be executed during recovery.")));
|
||||
|
||||
/*
|
||||
* Construct a tuple descriptor for the result row. This must match this
|
||||
@@ -514,7 +514,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
|
||||
* such as is returned by pg_stop_backup() or pg_xlog_switch().
|
||||
*/
|
||||
Datum
|
||||
pg_xlogfile_name(PG_FUNCTION_ARGS)
|
||||
pg_walfile_name(PG_FUNCTION_ARGS)
|
||||
{
|
||||
XLogSegNo xlogsegno;
|
||||
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
|
||||
@@ -524,7 +524,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("recovery is in progress"),
|
||||
errhint("pg_xlogfile_name() cannot be executed during recovery.")));
|
||||
errhint("pg_walfile_name() cannot be executed during recovery.")));
|
||||
|
||||
XLByteToPrevSeg(locationpoint, xlogsegno);
|
||||
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
|
||||
@@ -533,13 +533,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
/*
|
||||
* pg_xlog_replay_pause - pause recovery now
|
||||
* pg_wal_replay_pause - pause recovery now
|
||||
*
|
||||
* Permission checking for this function is managed through the normal
|
||||
* GRANT system.
|
||||
*/
|
||||
Datum
|
||||
pg_xlog_replay_pause(PG_FUNCTION_ARGS)
|
||||
pg_wal_replay_pause(PG_FUNCTION_ARGS)
|
||||
{
|
||||
if (!RecoveryInProgress())
|
||||
ereport(ERROR,
|
||||
@@ -553,13 +553,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
/*
|
||||
* pg_xlog_replay_resume - resume recovery now
|
||||
* pg_wal_replay_resume - resume recovery now
|
||||
*
|
||||
* Permission checking for this function is managed through the normal
|
||||
* GRANT system.
|
||||
*/
|
||||
Datum
|
||||
pg_xlog_replay_resume(PG_FUNCTION_ARGS)
|
||||
pg_wal_replay_resume(PG_FUNCTION_ARGS)
|
||||
{
|
||||
if (!RecoveryInProgress())
|
||||
ereport(ERROR,
|
||||
@@ -573,10 +573,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
/*
|
||||
* pg_is_xlog_replay_paused
|
||||
* pg_is_wal_replay_paused
|
||||
*/
|
||||
Datum
|
||||
pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
|
||||
pg_is_wal_replay_paused(PG_FUNCTION_ARGS)
|
||||
{
|
||||
if (!RecoveryInProgress())
|
||||
ereport(ERROR,
|
||||
@@ -618,7 +618,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
|
||||
* Compute the difference in bytes between two WAL locations.
|
||||
*/
|
||||
Datum
|
||||
pg_xlog_location_diff(PG_FUNCTION_ARGS)
|
||||
pg_wal_location_diff(PG_FUNCTION_ARGS)
|
||||
{
|
||||
Datum result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user