Skip to content

Commit 79ad8fc

Browse files
committed
Named restore point improvements.
Emit a log message when creating a named restore point, and improve documentation for pg_create_restore_point(). Euler Taveira de Oliveira, per suggestions from Thom Brown, with some additional wordsmithing by me.
1 parent 6079375 commit 79ad8fc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

doc/src/sgml/func.sgml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14069,6 +14069,16 @@ postgres=# select pg_start_backup('label_goes_here');
1406914069
of the transaction log file currently in use.
1407014070
</para>
1407114071

14072+
<para>
14073+
<function>pg_create_restore_point</> creates a named transaction log
14074+
record that can be used as recovery target, and returns the corresponding
14075+
transaction log location. The given name can then be used with
14076+
<xref linkend="recovery-target-name"> to specify the point up to which
14077+
recovery will proceed. Avoid creating multiple restore points with the
14078+
same name, since recovery will stop at the first one whose name matches
14079+
the recovery target.
14080+
</para>
14081+
1407214082
<para>
1407314083
<function>pg_current_xlog_location</> displays the current transaction log write
1407414084
location in the same format used by the above functions. Similarly,

src/backend/access/transam/xlog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8144,6 +8144,10 @@ XLogRestorePoint(const char *rpName)
81448144

81458145
RecPtr = XLogInsert(RM_XLOG_ID, XLOG_RESTORE_POINT, &rdata);
81468146

8147+
ereport(LOG,
8148+
(errmsg("restore point \"%s\" created at %X/%X",
8149+
rpName, RecPtr.xlogid, RecPtr.xrecoff)));
8150+
81478151
return RecPtr;
81488152
}
81498153

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy