接前文,初步学习pg_control文件之十二

看这个:

    * backupStartPoint is the redo pointer of the backup start checkpoint, if
* we are recovering from an online backup and haven't reached the end of
* backup yet. It is reset to zero when the end of backup is reached, and
* we mustn't start up before that. A boolean would suffice otherwise, but
* we use the redo pointer as a cross-check when we see an end-of-backup
* record, to make sure the end-of-backup record corresponds the base
* backup we're recovering from.
*/
...
XLogRecPtr backupStartPoint;

是说如果处在online backup中时会使用它。只有下面一个地方进行了赋值:

/*
* This must be called ONCE during postmaster or standalone-backend startup
*/
void
StartupXLOG(void)
{
… /* REDO */
if (InRecovery)
{

/*
* Set backupStartPoint if we're starting recovery from a base backup.
* However, if there was no recovery.conf, and the backup was taken
* with pg_start_backup(), we don't know if the server crashed before
* the backup was finished and we're doing crash recovery on the
* original server, or if we're restoring from the base backup. We
* have to assume we're doing crash recovery in that case, or the
* database would refuse to start up after a crash.
*/
if ((InArchiveRecovery && haveBackupLabel) || backupEndRequired)
ControlFile->backupStartPoint = checkPoint.redo; ControlFile->time = (pg_time_t) time(NULL);
/* No need to hold ControlFileLock yet, we aren't up far enough */
UpdateControlFile();

} …
}

初步学习pg_control文件之十三的更多相关文章

  1. 初步学习pg_control文件之十四

    接前文 初步学习pg_control文件之十三 看如下几个: /* * Parameter settings that determine if the WAL can be used for arc ...

  2. 初步学习pg_control文件之十五

    接前文  初步学习pg_control文件之十四 再看如下这个: int MaxConnections; 应该说,它是一个参考值,在global.c中有如下定义 /* * Primary determ ...

  3. 初步学习pg_control文件之十二

    接前问,初步学习pg_control文件之十一,再来看下面这个 XLogRecPtr minRecoveryPoint; 看其注释: * minRecoveryPoint is updated to ...

  4. 初步学习pg_control文件之十一

    接前文  初步学习pg_control文件之十,再看这个 XLogRecPtr prevCheckPoint; /* previous check point record ptr */ 发生了che ...

  5. 初步学习pg_control文件之十

    接前文 初步学习pg_control文件之九 看下面这个 XLogRecPtr checkPoint; /* last check point record ptr */ 看看这个pointer究竟保 ...

  6. 初步学习pg_control文件之九

    接前文,初步学习pg_control文件之八 来看这个: pg_time_t time; /* time stamp of last pg_control update */ 当初初始化的时候,是这样 ...

  7. 初步学习pg_control文件之八

    接前文  初步学习pg_control文件之七  继续 看:catalog_version_no 代码如下: static void WriteControlFile(void) { ... /* * ...

  8. 初步学习pg_control文件之七

    接前文 初步学习pg_control文件之六  看   pg_control_version 以PostgreSQL9.1.1为了,其HISTORY文件中有如下的内容: Release Release ...

  9. 初步学习pg_control文件之六

    接前文:初步学习pg_control文件之五 ,DB_IN_ARCHIVE_RECOVERY何时出现? 看代码:如果recovery.conf文件存在,则返回 InArchiveRecovery = ...

随机推荐

  1. python入门3 python变量,id(),is运算符

    python变量无需声明数据类型,可以直接赋值使用. 比如: num=100 #整数 str="字符串" #字符串 turple1 =('mon','tue','wed','thu ...

  2. C语言 变量类型

    // a是一个全局变量,静态变量 int a; void test() { // b是一个局部变量,自动变量 ; b++; // c是一个局部变量,静态变量 ; c++; printf("b ...

  3. 一、OSI模型

    OSI/RM协议是由ISO(国际标准化组织)制定的,它有三个基本的功能:提供给开发者一个必须的.通用的概念以便开发完善.可以用来解释连接不同系统的框架.OSI将计算机网络体系结构(architectu ...

  4. ACM-ICPC (10/15) Codeforces Round #440 (Div. 2, based on Technocup 2018 Elimination Round 2)

    A. Search for Pretty Integers You are given two lists of non-zero digits. Let's call an integer pret ...

  5. UOJ 48 次最大公约数

    次最大公约数 = gcd / 其中一个数质因数中最小的. gcd(42,12) = 6;    div(42) = 2*3*7   div(12) = 2^2*3 sgcd(42,12) = 6 / ...

  6. servlet 与 tomcat版本不匹配的问题

    严重: Failed to process JAR found at URL [/StudentLeave] for ServletContainerInitializers for context ...

  7. 【luogu P4114 Qtree1】 题解

    题目链接:https://www.luogu.org/problemnew/show/P4114 1.把边权转化到点权:选取连接这条边的两个点中较深的一个. 2.查询点到点之间的边权时,要从seg[x ...

  8. 【转载】Atom 是一款各方面体验都很像 Sublime Text 的编辑器

    转载:http://www.appinn.com/atom-editor/ Atom 是一款各方面体验都很像 Sublime Text 的编辑器,它由 Github 出品,目前免费. Atom 功能的 ...

  9. 安装 centos7

    一.安装 省略前面安装操作,直接进入设置界面: 日期.键盘等设置按默认即可,主要是系统安装位置需要设置,点击 系统安装位置,进入设置 最终完成分区: 点击左上角完成按钮 接受更改 开始安装 设置roo ...

  10. nineoldandroid 详细使用并且实现drawerlayout侧滑动画

    nineoldandroid.view.ViewHelpe是一个为了兼容3.0以下的一个动画开源库 相关函数解读:(第一个参数都为动画对象,第二个为动画属性值的变化表达式) ViewHelper.se ...