|
| 1 | +## PostgreSQL 17 preview - 频繁提交table access method相关patch, undo-based table access methods真的快来了吗? |
| 2 | + |
| 3 | +### 作者 |
| 4 | +digoal |
| 5 | + |
| 6 | +### 日期 |
| 7 | +2024-04-01 |
| 8 | + |
| 9 | +### 标签 |
| 10 | +PostgreSQL , PolarDB , DuckDB , undo-based table access methods |
| 11 | + |
| 12 | +---- |
| 13 | + |
| 14 | +## 背景 |
| 15 | + |
| 16 | +undo-based table access methods真的快来了吗? PostgreSQL 17频繁提交table access method相关功能增强patch. |
| 17 | + |
| 18 | +[《PostgreSQL 17 preview - 支持修改分区表access method》](../202403/20240326_04.md) |
| 19 | + |
| 20 | +[《PostgreSQL 17 preview - 寻找undo-based table access methods的蛛丝马迹》](../202403/20240326_03.md) |
| 21 | + |
| 22 | +table AM 增加自定义分析采样接口, 原因是原来的接口仅仅适合heap表架构, 索引组织表的采样方法显然不同. |
| 23 | + |
| 24 | +https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=27bc1772fc814946918a5ac8ccb9b5c5ad0380aa |
| 25 | +``` |
| 26 | +Generalize relation analyze in table AM interface |
| 27 | +author Alexander Korotkov <[email protected]> |
| 28 | +Sat, 30 Mar 2024 20:34:04 +0000 (22:34 +0200) |
| 29 | +committer Alexander Korotkov <[email protected]> |
| 30 | +Sat, 30 Mar 2024 20:34:04 +0000 (22:34 +0200) |
| 31 | +commit 27bc1772fc814946918a5ac8ccb9b5c5ad0380aa |
| 32 | +tree beb4fac8dfb2756c86f3ac13ec21d72f69daa55c tree |
| 33 | +parent b154d8a6d0e52e5f6b09739639fdf55fa88bc6b8 commit | diff |
| 34 | +Generalize relation analyze in table AM interface |
| 35 | + |
| 36 | +Currently, there is just one algorithm for sampling tuples from a table written |
| 37 | +in acquire_sample_rows(). Custom table AM can just redefine the way to get the |
| 38 | +next block/tuple by implementing scan_analyze_next_block() and |
| 39 | +scan_analyze_next_tuple() API functions. |
| 40 | + |
| 41 | +This approach doesn't seem general enough. For instance, it's unclear how to |
| 42 | +sample this way index-organized tables. This commit allows table AM to |
| 43 | +encapsulate the whole sampling algorithm (currently implemented in |
| 44 | +acquire_sample_rows()) into the relation_analyze() API function. |
| 45 | + |
| 46 | +Discussion: https://postgr.es/m/CAPpHfdurb9ycV8udYqM%3Do0sPS66PJ4RCBM1g-bBpvzUfogY0EA%40mail.gmail.com |
| 47 | +Reviewed-by: Pavel Borisov, Matthias van de Meent |
| 48 | +``` |
| 49 | + |
| 50 | +table AM 增加支持reloptions接口. |
| 51 | + |
| 52 | +https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c95c25f9af4bc77f2f66a587735c50da08c12b37 |
| 53 | +``` |
| 54 | +Custom reloptions for table AM |
| 55 | +author Alexander Korotkov <[email protected]> |
| 56 | +Sat, 30 Mar 2024 20:36:25 +0000 (22:36 +0200) |
| 57 | +committer Alexander Korotkov <[email protected]> |
| 58 | +Sat, 30 Mar 2024 20:36:25 +0000 (22:36 +0200) |
| 59 | +commit c95c25f9af4bc77f2f66a587735c50da08c12b37 |
| 60 | +tree 3f6f97b2ea2acf3de72b953e17ade6f5bc23db6e tree |
| 61 | +parent 27bc1772fc814946918a5ac8ccb9b5c5ad0380aa commit | diff |
| 62 | +Custom reloptions for table AM |
| 63 | + |
| 64 | +Let table AM define custom reloptions for its tables. This allows to |
| 65 | +specify AM-specific parameters by WITH clause when creating a table. |
| 66 | + |
| 67 | +The code may use some parts from prior work by Hao Wu. |
| 68 | + |
| 69 | +Discussion: https://postgr.es/m/CAPpHfdurb9ycV8udYqM%3Do0sPS66PJ4RCBM1g-bBpvzUfogY0EA%40mail.gmail.com |
| 70 | +Discussion: https://postgr.es/m/AMUA1wBBBxfc3tKRLLdU64rb.1.1683276279979.Hmail.wuhao%40hashdata.cn |
| 71 | +Reviewed-by: Reviewed-by: Pavel Borisov, Matthias van de Meent |
| 72 | +``` |
| 73 | + |
| 74 | +table AM 支持接管Insert index的逻辑. |
| 75 | + |
| 76 | +https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=b1484a3f1910bfd0e254afe40085dfc3351bda8c |
| 77 | +``` |
| 78 | +Let table AM insertion methods control index insertion master github/master |
| 79 | +author Alexander Korotkov <[email protected]> |
| 80 | +Sat, 30 Mar 2024 20:39:03 +0000 (22:39 +0200) |
| 81 | +committer Alexander Korotkov <[email protected]> |
| 82 | +Sat, 30 Mar 2024 20:53:56 +0000 (22:53 +0200) |
| 83 | +commit b1484a3f1910bfd0e254afe40085dfc3351bda8c |
| 84 | +tree 329e9e84dba07d2b85487c4acb5ebb975836947b tree |
| 85 | +parent c95c25f9af4bc77f2f66a587735c50da08c12b37 commit | diff |
| 86 | +Let table AM insertion methods control index insertion |
| 87 | + |
| 88 | +Previously, the executor did index insert unconditionally after calling |
| 89 | +table AM interface methods tuple_insert() and multi_insert(). This commit |
| 90 | +introduces the new parameter insert_indexes for these two methods. Setting |
| 91 | +'*insert_indexes' to true saves the current logic. Setting it to false |
| 92 | +indicates that table AM cares about index inserts itself and doesn't want the |
| 93 | +caller to do that. |
| 94 | + |
| 95 | +Discussion: https://postgr.es/m/CAPpHfdurb9ycV8udYqM%3Do0sPS66PJ4RCBM1g-bBpvzUfogY0EA%40mail.gmail.com |
| 96 | +Reviewed-by: Pavel Borisov, Matthias van de Meent, Mark Dilger |
| 97 | +``` |
| 98 | + |
| 99 | + |
| 100 | +#### [期望 PostgreSQL|开源PolarDB 增加什么功能?](https://github.com/digoal/blog/issues/76 "269ac3d1c492e938c0191101c7238216") |
| 101 | + |
| 102 | + |
| 103 | +#### [PolarDB 开源数据库](https://openpolardb.com/home "57258f76c37864c6e6d23383d05714ea") |
| 104 | + |
| 105 | + |
| 106 | +#### [PolarDB 学习图谱](https://www.aliyun.com/database/openpolardb/activity "8642f60e04ed0c814bf9cb9677976bd4") |
| 107 | + |
| 108 | + |
| 109 | +#### [购买PolarDB云服务折扣活动进行中, 55元起](https://www.aliyun.com/activity/new/polardb-yunparter?userCode=bsb3t4al "e0495c413bedacabb75ff1e880be465a") |
| 110 | + |
| 111 | + |
| 112 | +#### [PostgreSQL 解决方案集合](../201706/20170601_02.md "40cff096e9ed7122c512b35d8561d9c8") |
| 113 | + |
| 114 | + |
| 115 | +#### [德哥 / digoal's Github - 公益是一辈子的事.](https://github.com/digoal/blog/blob/master/README.md "22709685feb7cab07d30f30387f0a9ae") |
| 116 | + |
| 117 | + |
| 118 | +#### [About 德哥](https://github.com/digoal/blog/blob/master/me/readme.md "a37735981e7704886ffd590565582dd0") |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
0 commit comments