mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Implement archive_timeout feature to force xlog file switches to occur no more
than N seconds apart. This allows a simple, if not very high performance, means of guaranteeing that a PITR archive is no more than N seconds behind real time. Also make pg_current_xlog_location return the WAL Write pointer, add pg_current_xlog_insert_location to return the Insert pointer, and fix pg_xlogfile_name_offset to return its results as a two-element record instead of a smashed-together string, as per recent discussion. Simon Riggs
This commit is contained in:
@@ -11,11 +11,13 @@
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/xlog_internal.h,v 1.15 2006/08/07 16:57:57 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/xlog_internal.h,v 1.16 2006/08/17 23:04:08 tgl Exp $
|
||||
*/
|
||||
#ifndef XLOG_INTERNAL_H
|
||||
#define XLOG_INTERNAL_H
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "access/xlog.h"
|
||||
#include "fmgr.h"
|
||||
#include "storage/block.h"
|
||||
@@ -237,6 +239,12 @@ typedef struct RmgrData
|
||||
|
||||
extern const RmgrData RmgrTable[];
|
||||
|
||||
/*
|
||||
* Exported to support xlog switching from bgwriter
|
||||
*/
|
||||
extern time_t GetLastSegSwitchTime(void);
|
||||
extern XLogRecPtr RequestXLogSwitch(void);
|
||||
|
||||
/*
|
||||
* These aren't in xlog.h because I'd rather not include fmgr.h there.
|
||||
*/
|
||||
@@ -244,6 +252,7 @@ extern Datum pg_start_backup(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user