设为首页 加入收藏

TOP

PostgreSQL启动过程中的那些事七:初始化共享内存和信号二:shmem中初始化xlog(二)
2014-11-24 00:59:50 来源: 作者: 【 】 浏览:39
Tags:PostgreSQL 启动 过程 那些 初始 共享 内存 信号 shmem xlog
nness

* explicitly, since the pg_control versionwill surely look wrong to a

* machine of different endianness, but we doneed to worry about MAXALIGN

* and floating-point format. (Note: storage layout nominally also

* depends on SHORTALIGN and INTALIGN, but inpractice these are the same

* on all architectures of interest.)

*

* Testing just one double value is not a verybulletproof test for

* floating-point compatibility, but it willcatch most cases.

*/

uint32 maxAlign; /* alignment requirement for tuples */

double floatFormat; /* constant 1234567.0 */

#define FLOATFORMAT_VALUE 1234567.0

/*

* This data is used to make sure that configurationof this database is

* compatible with the backend executable.

*/

uint32 blcksz; /* data block size for this DB */

uint32 relseg_size; /* blocks per segment of large relation */

uint32 xlog_blcksz; /* block size within WAL files */

uint32 xlog_seg_size; /* size of each WAL segment */

uint32 nameDataLen; /* catalog name field width */

uint32 indexMaxKeys; /* max number of columns in an index */

uint32 toast_max_chunk_size; /* chunk size in TOAST tables */

/*flag indicating internal format of timestamp, interval, time */

bool enableIntTimes; /* int64 storageenabled */

/*flags indicating pass-by-value status of various types */

bool float4ByVal; /* float4 pass-by-value */

bool float8ByVal; /* float8, int8, etc pass-by-value */

/*CRC of all above ... MUST BE LAST! */

pg_crc32 crc;

} ControlFileData;

/*

* Bodyof CheckPoint XLOG records. This isdeclared here because we keep

* acopy of the latest one in pg_control for possible disaster recovery.

*Changing this struct requires a PG_CONTROL_VERSION bump.

*/

typedef struct CheckPoint

{

XLogRecPtr redo; /*next RecPtr available when we began to

* create CheckPoint (i.e. REDO start point) */

TimeLineID ThisTimeLineID; /* current TLI */

uint32 nextXidEpoch; /* higher-order bits of nextXid */

TransactionIdnextXid; /* next free XID */

Oid nextOid; /* next free OID */

MultiXactIdnextMulti; /* next freeMultiXactId */

MultiXactOffsetnextMultiOffset; /* next free MultiXactoffset */

TransactionIdoldestXid; /* cluster-wide minimumdatfrozenxid */

Oid oldestXidDB; /* database with minimum datfrozenxid */

pg_time_t time; /*time stamp of checkpoint */

/*

* Oldest XID still running. This is onlyneeded to initialize hot standby

* mode from an online checkpoint, so we onlybother calculating this for

* online checkpoints and only when wal_levelis hot_standby. Otherwise

* it's set to InvalidTransactionId.

*/

TransactionIdoldestActiveXid;

} CheckPoint;

/*

* Total shared-memorystate for XLOG.

*/

typedef struct XLogCtlData

{

/* Protected byWALInsertL

首页 上一页 1 2 3 4 下一页 尾页 2/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇YII数据库查询 下一篇PostgreSQL启动过程中的那些事七..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: