接前文 初步学习pg_control文件之十四 再看如下这个: int MaxConnections; 应该说,它是一个参考值,在global.c中有如下定义 /* * Primary determinants of sizes of shared-memory structures. MaxBackends is * MaxConnections + autovacuum_max_workers + 1 (it is computed by the GUC * assign hooks fo…
接前文 初步学习pg_control文件之十三 看如下几个: /* * Parameter settings that determine if the WAL can be used for archival * or hot standby. */ int wal_level; int MaxConnections; int max_prepared_xacts; int max_locks_per_xact; PostgreSQL中多次用到了函数数组: /* * Method table…
接前文,初步学习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 *…
接前问,初步学习pg_control文件之十一,再来看下面这个 XLogRecPtr minRecoveryPoint; 看其注释: * minRecoveryPoint is updated to the latest replayed LSN whenever we * flush a data change during archive recovery. That guards against * starting archive recovery, aborting it, and r…
接前文 初步学习pg_control文件之十,再看这个 XLogRecPtr prevCheckPoint; /* previous check point record ptr */ 发生了checkpoint的时候,肯定要处理的: /* * Perform a checkpoint --- either during shutdown, or on-the-fly * * flags is a bitwise OR of the following: * CHECKPOINT_IS_SHU…
接前文 初步学习pg_control文件之九 看下面这个 XLogRecPtr checkPoint; /* last check point record ptr */ 看看这个pointer究竟保留了什么 初始化的时候: /* * This func must be called ONCE on system install. It creates pg_control * and the initial XLOG segment. */ void BootStrapXLOG(void) {…
接前文,初步学习pg_control文件之八 来看这个: pg_time_t time; /* time stamp of last pg_control update */ 当初初始化的时候,是这样的: /* * This func must be called ONCE on system install. It creates pg_control * and the initial XLOG segment. */ void BootStrapXLOG(void) { ... Check…
接前文 初步学习pg_control文件之六 看 pg_control_version 以PostgreSQL9.1.1为了,其HISTORY文件中有如下的内容: Release Release Date: -- This release contains a variety of fixes . For information about new features in the 9.1 major release, see the Section called Release 9.1.…
接前文:初步学习pg_control文件之五 ,DB_IN_ARCHIVE_RECOVERY何时出现? 看代码:如果recovery.conf文件存在,则返回 InArchiveRecovery = true. /* * See if there is a recovery command file (recovery.conf), and if so * read in parameters for archive recovery and XLOG streaming. * The file…
接前文 初步学习pg_control文件之四,继续看何时出现 DB_IN_CRASH_RECOVERY: 看下面代码就比较清楚了:如果对 InArchiveRecovery 判断值为假,而且 读取出来pg_control文件的 state不是 SHUTDOWNED状态,表明当初没有来得及把SHUTDOWNED状态写入到pg_control文件,那么就是说系统已经崩溃了. /* * This must be called ONCE during postmaster or standalone-…
接前文,初步学习pg_control文件之三 继续分析 何时出现 DB_SHUTDOWNING状态: 在正常的shutdown的时候,需要进行checkpoint,所以就在此处,设置pg_control文件的state状态为DB_SHUTDOWNING. /* * Perform a checkpoint --- either during shutdown, or on-the-fly * * flags is a bitwise OR of the following: * CHECKPO…
接前文,初步学习pg_control文件之二 继续学习: 研究 DBState,先研究 DB_IN_PRODUCTION ,看它如何出现: 它出现在启动Postmaster时运行的函数处: /* * This must be called ONCE during postmaster or standalone-backend startup */ void StartupXLOG(void) { … /* * Read control file and check XLOG status lo…
接前文:初步认识pg_control文件 继续学习,pg_control文件在何处形成的?是在initdb的时候,运用的函数如下: /* * This func must be called ONCE on system install. It creates pg_control * and the initial XLOG segment. */ void BootStrapXLOG(void) { CheckPoint checkPoint; char *buffer; XLogPageH…
这个据说是PostgreSQL的control file. 到底如何呢,先看看改名后如何,把pg_control文件改名,然后启动 Postgres,运行时得到信息: [postgres@pg101 bin]$ postgres: could not find the database system Expected to find it in the directory "/usr/local/pgsql/bin/../data", but could not open file &…
VC工程里有个文件,只有文件里写了汉字,就报警告C4819 Warning C4819:The file contains a character that can ot be represented in the current code page(936). save the file in unicode format to prevent data loss. 初步猜测,文件中确实有936代码页不能表示的字符. 随后验证了下,没有这样的字符,只要出现汉字就报警. 通过 VS菜单.文件->…
上传程序后,安装phpMyAdmin-4.1.4-all-languages.3715384168.zip 出现了错误: Warning: realpath() [function.realpath]: !open_basedir restriction in effect. File(/home/www/cwcity/hosting/f/i/findgor/htdocs/phpmyadmin/libraries/Response.class.php) is not within the all…
MFC (Microsoft Foundation Class Library)中的各种类结合起来构成了一个应用程序框架,它的目的就是让程序员在此基础上来建立Windows下的应用程序,这是一种相对SDK来说更为简单的方法. 因为总体上,MFC框架定义了应用程序的轮廓,并提供了用户接口的标准实现方法,程序员所要做的就是通过预定义的接口把具体应用程序特有的东西填入这个轮廓. Microsoft Visual C++提供了相应的工具来完成这个工作:AppWizard可以用来生成初步的框架文件(代码…