zoukankan      html  css  js  c++  java
  • 初步学习pg_control文件之十三

    接前文,初步学习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();                            
            …                            
        }                                
                                        
        …                                
    }                                    
  • 相关阅读:
    bugku杂项—12-16题
    bugku杂项—1-11题
    symfony3 使用命令行工具生成Entity实体所踩的坑
    symfony2学习笔记——控制器
    symfony学习笔记——路由
    在window环境下安装symfony2框架注意事项
    window环境安装composer
    HTTP,FTP异常码大全【转载】
    关于session和cookie的区别
    关于mysql的查询优化
  • 原文地址:https://www.cnblogs.com/gaojian/p/3231932.html
Copyright © 2011-2022 走看看