暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 15 preview - libpq协议新增H消息, 通知DB server flush output buffer in pipeline mode.

digoal 2021-01-06
386

作者

digoal

日期

2021-06-30

标签

PostgreSQL , pipeline , flush output buffer


背景

PG 14引入的pipeline mode, 性能贼好.

《PostgreSQL 14 preview - libpq驱动 支持pipeline 模式, SQL请求支持异步化通信, 大幅度提升性能, 降低RT》

PG 15扩展H消息.

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a7192326c74da417d024a189da4d33c1bf1b40b6

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blobdiff;f=doc/src/sgml/libpq.sgml;h=59e3e678f9e7620a72ca5f74f76fec0beb2bd541;hp=641970f2a612d3f9dbd5b273e4abccd78f3172ed;hb=a7192326c74da417d024a189da4d33c1bf1b40b6;hpb=dd2364ced98553e0217bfe8f621cd4b0970db74a

```
Add PQsendFlushRequest to libpq author Alvaro Herrera alvherre@alvh.no-ip.org
Tue, 29 Jun 2021 18:37:39 +0000 (14:37 -0400) committer Alvaro Herrera alvherre@alvh.no-ip.org
Tue, 29 Jun 2021 18:37:39 +0000 (14:37 -0400) commit a7192326c74da417d024a189da4d33c1bf1b40b6 tree 1f568478bd54d354736330effbe2f94faa566d49 tree parent dd2364ced98553e0217bfe8f621cd4b0970db74a commit | diff Add PQsendFlushRequest to libpq

This new libpq function allows the application to send an 'H' message, which instructs the server to flush its outgoing buffer.

This hasn't been needed so far because the Sync message already requests a buffer; and I failed to realize that this was needed in pipeline mode because PQpipelineSync also causes the buffer to be flushed. However, sometimes it is useful to request a flush without establishing a synchronization point.

Backpatch to 14, where pipeline mode was introduced in libpq.

Reported-by: Boris Kolpackov boris@codesynthesis.com Author: Álvaro Herrera alvherre@alvh.no-ip.org Discussion: https://postgr.es/m/202106252350.t76x73nt643j@alvherre.pgsql ```

PostgreSQL 许愿链接

您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.

9.9元购买3个月阿里云RDS PostgreSQL实例

PostgreSQL 解决方案集合

德哥 / digoal's github - 公益是一辈子的事.

digoal's wechat

文章转载自digoal,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论