File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,8 @@ const struct config_enum_entry archive_mode_options[] = {
208
208
*/
209
209
CheckpointStatsData CheckpointStats ;
210
210
211
+ checkpoint_create_hook_type checkpoint_create_hook = NULL ;
212
+
211
213
/*
212
214
* During recovery, lastFullPageWrites keeps track of full_page_writes that
213
215
* the replayed WAL records indicate. It's initialized with full_page_writes
@@ -7173,6 +7175,9 @@ CreateCheckPoint(int flags)
7173
7175
*/
7174
7176
END_CRIT_SECTION ();
7175
7177
7178
+ if (checkpoint_create_hook != NULL )
7179
+ checkpoint_create_hook (& checkPoint );
7180
+
7176
7181
/*
7177
7182
* In some cases there are groups of actions that must all occur on one
7178
7183
* side or the other of a checkpoint record. Before flushing the
Original file line number Diff line number Diff line change 13
13
14
14
#include "access/xlogbackup.h"
15
15
#include "access/xlogdefs.h"
16
+ #include "catalog/pg_control.h"
16
17
#include "datatype/timestamp.h"
17
18
#include "lib/stringinfo.h"
18
19
#include "nodes/pg_list.h"
@@ -59,6 +60,9 @@ extern PGDLLIMPORT int wal_decode_buffer_size;
59
60
60
61
extern PGDLLIMPORT int CheckPointSegments ;
61
62
63
+ typedef void (* checkpoint_create_hook_type ) (const CheckPoint * );
64
+ extern PGDLLIMPORT checkpoint_create_hook_type checkpoint_create_hook ;
65
+
62
66
/* Archive modes */
63
67
typedef enum ArchiveMode
64
68
{
You can’t perform that action at this time.
0 commit comments