PostgreSQL WAL日志解析与应用日志一般存储在$PGDATA/pg_xlog内,他们一般以类似于 0000000100000002000000D4的文件存储。 00000001 00000002 000000D4 timeline LogId LogSeg • WAL 日志文件XLOG 文件是一个逻辑概念,每一个XLOG文件, 中国用户大会 Write Ahead Log Files Segment 3 2 1 256 00000001 00000002 000000D4 2048 XLOG XLogLongPageHeaderData XLogPageHeaderData Recode XlogRecord XLogRecData 2016Postgres中国用户大会 Header: len, xid, prev, XLOG_HEAP_INSERT, rmid, crc Data:tupleid, infos Id: 1 Name: jim Update test set name = ‘tom’ where id = 1; UPDATE Header: len, xid, prev, XLOG_HEAP_UPDATE, rmid, crc0 码力 | 16 页 | 705.31 KB | 1 年前3
PostgreSQL 9.6.24 Documentationdata type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the XLOG. This type is a representation of XLogRecPtr and an internal system type of PostgreSQL. Internally pg_ident.conf | 10 global | 11 pg_clog | 12 pg_snapshots | 13 pg_multixact | 14 PG_VERSION | 15 pg_xlog | 16 pg_hba.conf | 17 pg_stat_tmp | 18 pg_subtrans | 19 (19 rows) 9.25. System Information Functions non-exclusive pg_start_backup, non-exclusive pg_stop_backup, pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). Table 9-78. Backup Control Functions Name Return Type Description pg_create_restore_point(name0 码力 | 2814 页 | 6.58 MB | 1 年前3
PostgreSQL 9.6.24 Documentation
data type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the XLOG. This type is a representation of XLogRecPtr and an internal system type of PostgreSQL. Internally pg_ident.conf | 10 global | 11 pg_clog | 12 pg_snapshots | 13 pg_multixact | 14 PG_VERSION | 15 pg_xlog | 16 pg_hba.conf | 17 pg_stat_tmp | 18 pg_subtrans | 19 (19 rows) 9.25. System Information Functions non-exclusive pg_start_backup, non-exclusive pg_stop_backup, pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). Table 9-78. Backup Control Functions Name Return Type Description pg_create_restore_point(name0 码力 | 2661 页 | 6.53 MB | 1 年前3
PostgreSQL 9.5.25 Documentation
data type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the XLOG. This type is a representation of XLogRecPtr and an internal system type of PostgreSQL. Internally pg_ident.conf | 10 global | 11 pg_clog | 12 pg_snapshots | 13 pg_multixact | 14 PG_VERSION | 15 pg_xlog | 16 pg_hba.conf | 17 pg_stat_tmp | 18 pg_subtrans | 19 (19 rows) 9.25. System Information Functions functions cannot be executed during recovery (except pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). Table 9-68. Backup Control Functions Name Return Type Description pg_create_restore_point(name0 码力 | 2558 页 | 6.27 MB | 1 年前3
PostgreSQL 9.5 Documentationdata type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the XLOG. This type is a representation of XLogRecPtr and an internal system type of PostgreSQL. Internally pg_ident.conf | 10 global | 11 pg_clog | 12 pg_snapshots | 13 pg_multixact | 14 PG_VERSION | 15 pg_xlog | 16 pg_hba.conf | 17 pg_stat_tmp | 18 323 Chapter 9. Functions and Operators pg_subtrans | 19 functions cannot be executed during recovery (except pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). 338 Chapter 9. Functions and Operators Table 9-68. Backup Control Functions Name0 码力 | 2714 页 | 6.33 MB | 1 年前3
PostgreSQL 9.4 Documentationdata type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the XLOG. This type is a representation of XLogRecPtr and an internal system type of PostgreSQL. Internally pg_ident.conf | 10 global | 11 pg_clog | 12 pg_snapshots | 13 pg_multixact | 14 PG_VERSION | 15 pg_xlog | 16 pg_hba.conf | 17 pg_stat_tmp | 18 pg_subtrans | 19 (19 rows) 9.25. System Information Functions functions cannot be executed during recovery (except pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). Table 9-65. Backup Control Functions Name Return Type Description pg_create_restore_point(name0 码力 | 2603 页 | 6.05 MB | 1 年前3
PostgreSQL 9.4.26 Documentation
data type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the XLOG. This type is a representation of XLogRecPtr and an internal system type of PostgreSQL. Internally pg_ident.conf | 10 global | 11 pg_clog | 12 pg_snapshots | 13 pg_multixact | 14 PG_VERSION | 15 pg_xlog | 16 pg_hba.conf | 17 pg_stat_tmp | 18 pg_subtrans | 19 (19 rows) 9.25. System Information Functions functions cannot be executed during recovery (except pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). Table 9-65. Backup Control Functions 302 Chapter 9. Functions and Operators Name0 码力 | 2452 页 | 5.99 MB | 1 年前3
Greenplum分布式事务和两阶段提交协议prepared事务的恢复过程: 当执行prepare时候,PG会把该事务的lock信息当做prepare日志记录的一部分记录在日志文件(xlog)里。当数 据库重新启动,会读这个日志文件(xlog)这条日志记录,把锁“还原”到pg_lock表里。 1. StartupXlog函数发现XLOG_XACT_PREPARE日志记录进行redo,调用函数recreateTwoPhaseFile将 该日志记录中的信息放到 用于判断分布式事务是否提交,作用和PG 的commit log类似,基于simple LRU实现 • 分布式死锁检测 • 本地事务的管理:创建、提交、状态迁移 等 • 加锁和MVCC • 本地事务的死锁检测 • xlog、commit log(CLOG) • 对PREPARE、COMMIT/ABORT PREPARED语句的处理 Greenplum在PG的基础上实现 Greenplum复用PG的实现 330 码力 | 42 页 | 2.12 MB | 1 年前3
PostgreSQL 9.3.25 Documentationfunctions cannot be executed during recovery (except pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). Table 9-61. Backup Control Functions Name Return Type Description pg_create_restore_point(name performing restore (restricted to superusers) pg_current_xlog_insert_location() text Get current transaction log insert location pg_current_xlog_location() text Get current transaction log write location ) timestamp with time zone Get start time of an on-line exclusive backup in progress. pg_switch_xlog() text Force switch to a new transaction log file (restricted to superusers) pg_xlogfile_name(location0 码力 | 3002 页 | 7.47 MB | 1 年前3
PostgreSQL 9.3 Documentationfunctions cannot be executed during recovery (except pg_is_in_backup, pg_backup_start_time and pg_xlog_location_diff). Table 9-61. Backup Control Functions Name Return Type Description 303 Chapter performing restore (restricted to superusers) pg_current_xlog_insert_location() text Get current transaction log insert location pg_current_xlog_location() text Get current transaction log write location () timestamp with time zone Get start time of an on-line exclusive backup in progress. pg_switch_xlog() text Force switch to a new transaction log file (restricted to superusers) pg_xlogfile_name(location0 码力 | 3183 页 | 7.53 MB | 1 年前3
共 71 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8













