Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f289c2

Browse files
committed
Switch various builtin functions to use pg_lsn instead of text.
The functions in slotfuncs.c don't exist in any released version,but the changes to xlogfuncs.c represent backward-incompatibilities.Per discussion, we're hoping that the queries using these functionsare few enough and simple enough that this won't cause too muchbreakage for users.Michael Paquier, reviewed by Andres Freund and further modifiedby me.
1 parent694e3d1 commit6f289c2

File tree

7 files changed

+45
-172
lines changed

7 files changed

+45
-172
lines changed

‎doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5244,7 +5244,7 @@
52445244

52455245
<row>
52465246
<entry><structfield>restart_lsn</structfield></entry>
5247-
<entry><type>text</type></entry>
5247+
<entry><type>pg_lsn</type></entry>
52485248
<entry></entry>
52495249
<entry>The address (<literal>LSN</literal>) of oldest WAL which still
52505250
might be required by the consumer of this slot and thus won't be

‎doc/src/sgml/func.sgml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15884,35 +15884,35 @@ SELECT set_config('log_statement_stats', 'off', false);
1588415884
<entry>
1588515885
<literal><function>pg_create_restore_point(<parameter>name</> <type>text</>)</function></literal>
1588615886
</entry>
15887-
<entry><type>text</type></entry>
15887+
<entry><type>pg_lsn</type></entry>
1588815888
<entry>Create a named point for performing restore (restricted to superusers)</entry>
1588915889
</row>
1589015890
<row>
1589115891
<entry>
1589215892
<literal><function>pg_current_xlog_insert_location()</function></literal>
1589315893
</entry>
15894-
<entry><type>text</type></entry>
15894+
<entry><type>pg_lsn</type></entry>
1589515895
<entry>Get current transaction log insert location</entry>
1589615896
</row>
1589715897
<row>
1589815898
<entry>
1589915899
<literal><function>pg_current_xlog_location()</function></literal>
1590015900
</entry>
15901-
<entry><type>text</type></entry>
15901+
<entry><type>pg_lsn</type></entry>
1590215902
<entry>Get current transaction log write location</entry>
1590315903
</row>
1590415904
<row>
1590515905
<entry>
1590615906
<literal><function>pg_start_backup(<parameter>label</> <type>text</> <optional>, <parameter>fast</> <type>boolean</> </optional>)</function></literal>
1590715907
</entry>
15908-
<entry><type>text</type></entry>
15908+
<entry><type>pg_lsn</type></entry>
1590915909
<entry>Prepare for performing on-line backup (restricted to superusers or replication roles)</entry>
1591015910
</row>
1591115911
<row>
1591215912
<entry>
1591315913
<literal><function>pg_stop_backup()</function></literal>
1591415914
</entry>
15915-
<entry><type>text</type></entry>
15915+
<entry><type>pg_lsn</type></entry>
1591615916
<entry>Finish performing on-line backup (restricted to superusers or replication roles)</entry>
1591715917
</row>
1591815918
<row>
@@ -15933,26 +15933,26 @@ SELECT set_config('log_statement_stats', 'off', false);
1593315933
<entry>
1593415934
<literal><function>pg_switch_xlog()</function></literal>
1593515935
</entry>
15936-
<entry><type>text</type></entry>
15936+
<entry><type>pg_lsn</type></entry>
1593715937
<entry>Force switch to a new transaction log file (restricted to superusers)</entry>
1593815938
</row>
1593915939
<row>
1594015940
<entry>
15941-
<literal><function>pg_xlogfile_name(<parameter>location</> <type>text</>)</function></literal>
15941+
<literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
1594215942
</entry>
1594315943
<entry><type>text</type></entry>
1594415944
<entry>Convert transaction log location string to file name</entry>
1594515945
</row>
1594615946
<row>
1594715947
<entry>
15948-
<literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>text</>)</function></literal>
15948+
<literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
1594915949
</entry>
1595015950
<entry><type>text</>, <type>integer</></entry>
1595115951
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
1595215952
</row>
1595315953
<row>
1595415954
<entry>
15955-
<literal><function>pg_xlog_location_diff(<parameter>location</> <type>text</>, <parameter>location</> <type>text</>)</function></literal>
15955+
<literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
1595615956
</entry>
1595715957
<entry><type>numeric</></entry>
1595815958
<entry>Calculate the difference between two transaction log locations</entry>
@@ -16107,7 +16107,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1610716107
<entry>
1610816108
<literal><function>pg_last_xlog_receive_location()</function></literal>
1610916109
</entry>
16110-
<entry><type>text</type></entry>
16110+
<entry><type>pg_lsn</type></entry>
1611116111
<entry>Get last transaction log location received and synced to disk by
1611216112
streaming replication. While streaming replication is in progress
1611316113
this will increase monotonically. If recovery has completed this will
@@ -16121,7 +16121,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1612116121
<entry>
1612216122
<literal><function>pg_last_xlog_replay_location()</function></literal>
1612316123
</entry>
16124-
<entry><type>text</type></entry>
16124+
<entry><type>pg_lsn</type></entry>
1612516125
<entry>Get last transaction log location replayed during recovery.
1612616126
If recovery is still in progress this will increase monotonically.
1612716127
If recovery has completed then this value will remain static at
@@ -16335,7 +16335,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1633516335
<literal><function>pg_create_physical_replication_slot(<parameter>slotname</parameter> <type>text</type>, <parameter>plugin</parameter> <type>text</type>)</function></literal>
1633616336
</entry>
1633716337
<entry>
16338-
(<parameter>slotname</parameter> <type>text</type>, <parameter>xlog_position</parameter> <type>text</type>)
16338+
(<parameter>slotname</parameter> <type>text</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>)
1633916339
</entry>
1634016340
<entry>
1634116341
Creates a new physical replication slot named

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp