接前文,初步学习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. March 14 2017 Week 11 Tuesday

    Thinking will not overcome fear but action will. 空想终日惶恐,行动方可无惧. As the deadline comes closer and clo ...

  2. 走进git

    一.什么是git和githob? Git是一款免费.开源的分布式版本控制系统.Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件.Githu ...

  3. python入门7 字符串操作

    字符串操作 #coding:utf-8 #/usr/bin/python """ 2018-11-03 dinghanhua 字符串操作 ""&quo ...

  4. Spring3+Struts2+Hibernate4+Mybatis整合的一个maven例子

    说明: 1.用了maven去搞这个demo,懒得去导jar包... 2.这个demo用了spring去做Ioc,事务的aop:用了struts2去做“MVC”(没有用到任何UI技术,有点对不起这个MV ...

  5. 【BZOJ4766】文艺计算姬(prufer序列)

    点此看题面 大致题意: 让你求一个两边各有\(n\)和\(m\)个点的完全二分图有多少个生成树. \(prufer\)序列 这是一道比较经典的利用\(prufer\)序列结论求解答案的计数题. 大致思 ...

  6. webstorm识别php代码

    在 setting --editor--filetype---找到html 在下面的框里点右边加好,添加*.php

  7. 二.Mybatis 增删改查

    Student.java package com.pojo; import java.util.Date; public class Student { int stuid; String stuNa ...

  8. HTML5之转动的轮子

    <!doctype html><html> <head></head> <body> <canvas width="1000 ...

  9. SpringMVC知识点总结

    1. SpringMVC概述        SpringMVC是一个WEB层框架,主要用来负责与页面的交互.        SpringMVC是Spring家族的一大组件.Spring整合Spring ...

  10. 还在占用存储的进程lsof grep deleted;

    查看僵尸进程 lsof grep deleted; 用于查看已经停止但还在占用存储的进程