PostgreSQL 9.3 Make the streaming replication protocol messages architecture-independent

Allow tools like pg_receivexlog to run on computers with different architectures (Heikki Linnakangas)
WAL files can still only be replayed on servers with the same architecture as the primary; but they can now be transmitted to and stored on machines of any architecture, since the streaming replication protocol is now machine-independent.

Make the streaming replication protocol messages architecture-independent.
We used to send structs wrapped in CopyData messages, which works as long as
the client and server agree on things like endianess, timestamp format and
alignment. That's good enough for running a standby server, which has to run
on the same platform anyway, but it's useful for tools like pg_receivexlog
to work across platforms.

This breaks protocol compatibility of streaming replication, but we never
promised that to be compatible across versions, anyway.

PostgreSQL 9.3 对流复制协议的改进之一, 跨平台兼容.

例如你的数据库跑在x86主机上, 同时你可以在IBM小型机上使用同一版本的数据库软件(例如pg_receivexlog工具.)通过流复制协议接收x86主机上的xlog文件.

[参考]

1. http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=add6c3179a4d4fa3e62dd3e86a00f23303336bac

2. http://www.postgresql.org/docs/devel/static/app-pgreceivexlog.html

时间: 2024-10-28 07:46:53

PostgreSQL 9.3 Make the streaming replication protocol messages architecture-independent的相关文章

PostgreSQL 9.3 Allow a streaming replication standby to follow a timeline switch

Allow a streaming replication standby to follow a timeline switch. Before this patch, streaming replication would refuse to start replicating if the timeline in the primary doesn't exactly match the standby. The situation where it doesn't match is wh

PostgreSQL patch: Allow a streaming replication standby to follow a timeline switch

这个补丁不错, 省去了主从切换手工复制history文件的烦恼. Before this patch, streaming replication would refuse to start replicating if the timeline in the primary doesn't exactly match the standby.  The situation where it doesn't match is when you have a master, and two sta

PostgreSQL Streaming Replication COMMAND used in psql

CF里面在讨论是否要添加一个查看数据库system id的函数, pg_system_identifier(); http://www.postgresql.org/message-id/flat/5215346B.7070800@dalibo.com#5215346B.7070800@dalibo.com 这个函数的用途和pg_controldata输出的Database system identifier值其实是一个效果. 只是它的目的是可以用SQL来得到这个值. 看到后面发现一个很有趣的东

PostgreSQL 9.2 devel adding cascading replication support

今天一位QQ群里的网友说PostgreSQL支持级联复制.我一开始表示怀疑,后来查到9.2的手册里确实有级联复制的说明,于是把9.2的开发版本下载过来测试了一下,以下是测试过程. 测试环境如图 :  主节点在杭州IDC, 第一个standby 节点在北京1号机房 第二个和第三个standby 节点在北京的2号机房. 这样做的好处是节约了跨地域复制的带宽,9.1和9.0的版本三个standby都需要直连到master节点进行复制.而9.2的standby节点可以同时启用walreceiver和wa

PostgreSQL 9.3 Make pg_receivexlog and pg_basebackup -X stream work across timeline switches.

Allow pg_receivexlog and pg_basebackup --xlog-method to handle streaming timeline switches (Heikki Linnakangas) Make pg_receivexlog and pg_basebackup -X stream work across timeline switches. This mirrors the changes done earlier to the server in stan

PostgreSQL 9.4 new feature: Replication slots

PostgreSQL 9.4 新增的一个特写, replication slot,  1. 可以被流复制的sender节点用于自动识别它xlog中的数据在下面的standby中是否还需要(例如, standby断开连接后, 还未接收到的XLOG), 如果还需要的话, 那么这些XLOG将不会被删除. 2. 对于tuples, 如果standby 配置了hot_standby_feedback=on, 那么发生冲突的tuples将不会在sender端被vacuum回收. 用于规避冲突. 配置比较简单

PostgreSQL client's startup packet different between logical and normal stream replication

我们知道PostgreSQL 9.4新增了逻辑流复制的功能, 在客户端连接数据库服务器时, 通过发送给数据库的startup packet来判断是否要数据库启动wal sender, 并且如何来识别是逻辑复制还是普通的流复制. 数据库处理启动包的代码9.3和9.4的区别 :  PostgreSQL 9.4的 ProcessStartupPacket@src/backend/postmaster/postmaster.c /* * Read a client's startup packet an

PostgreSQL HOT STANDBY using Stream replication

案例解析二.PostgreSQL HOT STANDBY by stream replication 测试:一.准备硬件1. 主节点硬件配置DISK : 146GB*6MEM : 14GBCPU : 2.83GHz*82. standby节点硬件配置DISK : 146GB*4MEM : 8GBCPU : 2.0GHz*8 二.准备环境1. 系统Red Hat Enterprise Linux Server release 5.5 (Tikanga) x642. 时钟同步8 * * * * /u

PostgreSQL standby replication error : invalid record length at %u

一位QQ上的网友问我的一个问题,我觉得比较有意思. 记录如下 :  Question :  我在启动POSTGRES的STANDBY数据库时,报 -------------------------- LOG:  database system was shut down in recovery at 2011-12-30 23:20:25 CST LOG:  entering standby mode LOG:  restored log file "0000000100000002000000