cary huang: PostgreSQL’s Planner – Simple Scan Paths vs Plans

1 Introduction 2 Where it all start 3 What happens behind pg_plan_query 4 set_base_rel_sizes() 5 set_base_rel_pathlist() 6 generate_gather_paths 7 get_cheapest_fractional_path and create_plan 8 Examine the Plan 本文为摘录,原文为: https://postgr.es/p/6s9 1 Introduction 当你向 PostgreSQL 发送查询时,通常会经历查询处理的各个阶段,并在最后返回...

March 25, 2024 · Yang Yingchao

100x Faster Query in Aurora Postgres with a lower random_page_cost

1 What is Random Page Cost? 2 Diving Deeper 3 Seeing is Believing: Before and After Examples 3.1 Before (RPC = 4.0): 3.2 After (RPC = 1.1): 4 can perform it on a per query/connection basis 本文为摘录,原文为: https://postgr.es/p/6oe 最近我在 Postgres 中处理一些查询,发现它要么选择不使用...

February 26, 2024 · Yang, Ying-chao

Gentoo Tips

1 Failed to login as normal user 1 Failed to login as normal user passwd 中,用户使用的 shell , 必需是包含在 /etc/shells 里面的,否则会无法登录,哪怕密码没有问题。

February 20, 2024 · Yang, Ying-chao

HashData|产品介绍

1 Abort HashData 2 设计理念 3 架构介绍 3.1 管理模块 3.2 用户模块 4 产品特性 4.1 数据仓库服务 4.2 灵活高效的业务支持 4.3 多维度弹性 4.4 高可用和低成本 4.5 接近零停机时间 4.6 优化...

January 12, 2024 · Yang, Ying-chao

How can 3ware and MegaRAID performance be increased in Linux?

1 Question 2 Answer 2.1 For the Linux 2.6 kernel: 2.2 For the Linux 2.4 kernel: 本文为摘录,原文为: https://www.broadcom.com/support/knowledgebase/1211161453667/how-can-3ware-and-megaraid-performance-be-increased-in-linux 1 Question How can LSI 3ware and LSI MegaRAID performance be increased in Linux? 2 Answer 2.1 For the Linux 2.6 kernel: See KB article A004958 Article ID 1211161457978 See also: Article ID 1211161479669 Third party software such as SarCheck http://www.sarcheck.com can also...

December 28, 2023 · Yang, Ying-chao

Linux内核机制—spin_lock (转载)

1 pin_lock 概述 2 相关数据结构 2.1 struct spinlock 2.2 struct qnode 3 相关函数 3.1 初始化函数 3.2 上锁函数 3.3 解锁函数 3.4 尝试获取锁函数 3.5 判断上锁状态 3.6 还可以直接使用 raw_spinlock_t 和与其配套的一组...

December 28, 2023 · Yang, Ying-chao

A Close Look at a Spinlock – Embedded in Academia

本文为摘录,原文为: https://blog.regehr.org/archives/2173 自旋锁 (spinlock) 是多处理器操作系统提供的最基本的互斥原语。自旋锁需要保护当前 CPU 免受 抢占(通常通过禁用中断,但我们会在本文中忽略...

December 27, 2023 · Yang, Ying-chao

Compiler considerations — The Linux Kernel 5.7.0+ documentation

1 Interprocedural optimization 2 GCC function suffixes 本文为摘录,原文为: https://people.redhat.com/~jolawren/klp-compiler-notes/livepatch/compiler-considerations.html 1 Interprocedural optimization 函数内联可能是影响动态修补最常见的编译器优化。在一个简单的例子中,内联将原始代码转换为: foo() { ... [ foo...

December 27, 2023 · Yang, Ying-chao

Note about PO file in PostgreSQL

1 Concepts 本文为摘录,原文为: https://github.com/postgres/postgres/blob/master/doc/src/sgml/nls.sgml#L52 1 Concepts The pairs of original (English) messages and their (possibly) translated equivalents are kept in message catalogs , one for each program (although related programs can share a message catalog) and for each target language. There are two file formats for message catalogs: The first is the PO file (for Portable Object), which is a plain...

December 18, 2023 · Yang, Ying-chao

how to avoid memory being swapped (locking memory pages)

1 mlockall() 2 how to do this after program started and program does not call mlockall() ? 3 内核实现 3.1 mlockall() 3.2 内存区域标记 4 Swap 4.1 Swap info 4.2 Locks 4.3 fork 时候复制 swap… 4.4 进程退出时候清理 swap 。。。 5 RLIMIT_MEMLOCK 本文为摘录,...

December 16, 2023 · Yang, Ying-chao

LogIndex | PolarDB for PostgreSQL

1 背景介绍 2 RO 内存同步架构 3 WAL Meta 4 LogIndex 4.1 内存数据结构 4.2 磁盘数据结构 5 日志回放 5.1 延迟回放 5.2 Mini Transaction 6 总结 本文为摘录,原文为: https://apsaradb.github.io/PolarDB-for-PostgreSQL/zh/theory/logindex.html 1 背景介绍 PolarDB 采用了共享...

December 11, 2023 · Yang, Ying-chao

PolarDB for PostgreSQL架构介绍

1 传统数据库的问题 2 PolarDB PostgreSQL 版云原生数据库的优势 3 PolarDB PostgreSQL 版整体架构概述 3.1 存储计算分离架构概述 3.2 HTAP 架构概述 本文为摘录,原文为: https://help.aliyun.com/zh/polardb/polardb-for-postgresql/polardb-for-postgresql-architecture/?spm=a2c4g.11186623.0.0.2e3b5fb1p0L9je PolarDB PostgreSQL 版是一款阿里云自...

December 11, 2023 · Yang, Ying-chao

polardb pg HTAP架构详解

1 HTAP 架构原理 2 分布式优化器 3 算子并行化 4 消除数据倾斜问题 5 SQL 级别弹性扩展 6 事务一致性 7 TPC-H 性能:加速比 8 TPC-H 性能:和传统 MPP 数仓对比 9 分布式执行加...

December 11, 2023 · Yang, Ying-chao

PolarDB PostgreSQL 版:存储计算分离架构详解

1 Shared-Storage 带来的挑战 2 架构原理 3 数据一致性 3.1 传统数据库的内存状态同步 3.2 基于 Shared-Storage 的内存状态同步 3.3 基于 Shared-Storage 的过去页面 3.4 过去页面的解法 3.5 基于 Shared-Storage 的未来页面 3.6 未...

December 11, 2023 · Yang, Ying-chao

OCI Database with PostgreSQL: 完善OCI的云数据库套件以满足各种需求

1 为什么 OCI Database for PostgreSQL 脱颖而出 2 Vanilla PostgreSQL 的问题 3 OCI Database with PostgreSQL – 高级架构 3.1 数据库优化存储 (DbOS) 的优点 3.2 进一步的存储优化 3.3 结论 本文为摘录,原文为: https://mp.weixin.qq.com/s?__biz=MzI3OTM3MDkyNg==&mid=2247497316&idx=1&sn=d08b84d63ab2e4b69949af9170762189&chksm=eb4a7ba5dc3df2b3ca2b3721e5614ab5711be6e984ec44173035323953d193440240f8412591&mpshare=1&scene=1&srcid=1208AtRH30qSa2LdMxzmf3sV&sharer_shareinfo=9a0858a92025bbb0e8887abc9a5eee8a&sharer_shareinfo_first=9a0858a92025bbb0e8887abc9a5eee8a#rd 对于希望在云中...

December 8, 2023 · Yang Yingchao

What is the difference between elfutils and binutils

1 What is the difference between elfutils and binutils 2 eu-stack vs gdb 3 eu-strip vs strip 4 eu-addr2line vs addr2line 本文为摘录,原文为: https://lynxbee.com/what-is-the-difference-between-elfutils-and-binutils/#:~:text=Ulrich%20Drepper%20who%20authored%20elfutils%20has%20mentioned%20the,available%20in%20binutils%20which%20are%20in%20%28wide%29%20use 1 What is the difference between elfutils and binutils 根据维基百科的介绍,elfutils 被描述为“Ulrich...

November 14, 2023 · Yang, Ying-chao

Linux Installation Date: How to Discover Your System's Age

1 A Universal Method 2 Debian / Ubuntu 3 Fedora / Rocky Linux / AlmaLinux 4 Arch Linux 本文为摘录,原文为: https://linuxiac.com/how-to-find-linux-os-installation-date/ 1 A Universal Method 首先,我们必须澄清一点,在 Linux 中没有专门的设置、变量、日志文件条目或类似的东...

November 3, 2023 · Yang Yingchao

silly questions related to docker & debian

1 docker 1.1 how to convert container to image? 1.2 how to export image to tar ? 1.3 how to import image into docker 如何将图像导入到 Docker 1.4 how to rename an image in docker 如何在 Docker 中重命名镜像 2 Debian 2.1 I’m running a debian docker, and I can’t find ip addr command 2.2 how to get...

October 31, 2023 · Yang Yingchao

Barriers in PostgresSQL

1 Barriers: 协调进程的同步屏障 1.1 静态参与 2 TODO: Barriers API 3 TODO: how it is used in hash jon… 简单总结一下 PG 中进程同步用到的屏障: https://github.com/postgres/postgres/blob/master/src/backend/storage/ipc/barrier.c 1 Barriers: 协调进程的同步屏障 来自维基百科[1...

October 21, 2023 · Yang, Ying-chao

Linux 中如何安全地抹去磁盘数据

1 rm 不能安全擦除 2 shred 3 wipe 4 dd 本文为摘录,原文为: https://mp.weixin.qq.com/s/w-pMU3_TD3dEPoW-XEde-A https://mp.weixin.qq.com/s/w-pMU3_TD3dEPoW-XEde-A 1 rm 不能安全擦除 因为 rm 命令或者文件管理器删除文件只是删除指向文件系统的指针(inode)...

October 20, 2023 · Yang, Ying-chao