postgresql中的冻结
2016-02-01 20:10
330 查看
pg会进行常规的清理老的事务标识符活动,也是就是冻结,来延迟事务wrapround,在pg中一行有2个途径,行版本死亡需要被vacuum清除,或是一个行的版本足够老需要被冻结,
对一个数据库进行vacuum操作
psql -c "VACUUM" postgres
pg使用4字节长度来表示标识符,所以事务的个数是有限的,分配标识符是通过循环的方式进行的,当出啊先wrapround的时候,可能会报下面的错误
ERROR: database is not accepting commands to avoid wraparound data loss in database
"template0"
HINT: Stop the postmaster and use a standalone backend to vacuum that database
standalone backend的方式如下:
$ postgres --single -D /full/path/to/datadir postgres
backend> VACUUM;
执行完后,退出终端
Prepared transactions are part of the "two-phase commit" feature, also known as 2PC. A
transaction commits in two stages rather than one, allowing multiple databases to have
synchronized commits. It's typical use is to combine multiple "resource managers" using
the XA protocol, usually provided by a Transaction Manager (TM), as used by the Java
Transaction API (JTA) and others. If none of that meant anything to you, then you probably
don't have any prepared transactions.
对一个数据库进行vacuum操作
psql -c "VACUUM" postgres
pg使用4字节长度来表示标识符,所以事务的个数是有限的,分配标识符是通过循环的方式进行的,当出啊先wrapround的时候,可能会报下面的错误
ERROR: database is not accepting commands to avoid wraparound data loss in database
"template0"
HINT: Stop the postmaster and use a standalone backend to vacuum that database
standalone backend的方式如下:
$ postgres --single -D /full/path/to/datadir postgres
backend> VACUUM;
执行完后,退出终端
Prepared transactions are part of the "two-phase commit" feature, also known as 2PC. A
transaction commits in two stages rather than one, allowing multiple databases to have
synchronized commits. It's typical use is to combine multiple "resource managers" using
the XA protocol, usually provided by a Transaction Manager (TM), as used by the Java
Transaction API (JTA) and others. If none of that meant anything to you, then you probably
don't have any prepared transactions.
相关文章推荐
- 记录数据库操作到文本
- Redis工作系列之一 与 Memcached对比理解
- T-SQL:GO语句和批处理
- MySQL存储过程
- mysql数据库备份设置延时备份方法(mysql主从配置)
- 在织梦标签中使用SQL实现多个数据的读取方法
- postgresql关于auto vacuum
- sqlite3安装
- redis安装步骤
- oracle 同义词
- redis中存储中文额显示为16进制字符问题
- redis中存储中文额显示为16进制字符问题
- MySQL触发器 trigger之for each row
- mysql索引注意事项
- 在sql server中创建只读的user
- sql server 怎么实现mysql中group_concat,列转行,列用分隔符拼接字符串
- 用pt-online-schema-change给大表在线加字段的时候导致从库数据丢失的问题
- sql server 怎么实现mysql中group_concat,列转行,列用分隔符拼接字符串
- 使用MongoDB快速分页
- 数据库索引的作用和优点缺点以及索引的11中用法