PostgreSQL DBA(69) - Postgres tips for the average and power user
下面是一些有用的tips: In psql, tag your queries and use Ctrl+R [local]:5432 pg12@testdb=# select * from t1 limit 1; id | c1 | c2 ----+----+---- 4 | 4 | 4 (1 row) Time: 1.872 ms [local]:5432 pg
PostgreSQL DBA(68) - 使用DBLink实现自治事务
由于PostgreSQL没有提供类似Oracle的自治事务控制功能,本节介绍了如何使用dblink实现简单的自治事务控制.
Oracle vs PostgreSQL DBA(13)- 拆分(split)分区
直至12版本,PostgreSQL仍没有提供直接拆分分区的功能,暂时只能通过detach&attach实现,相对于Oracle的split支持,PG显得比较的simple&naive.
PostgreSQL DBA(67) - PG 12 SQLJSON path
PostgreSQL 12提供了SQL/JSON函数用以兼容SQL 2016 SQL/JSON特性.
PostgreSQL DBA(66) - 配置参数(checkpoint_flush_after)
checkpoint_flush_after参数,官方解释是: Whenever more than checkpoint_flush_after bytes have been written while performing a checkpoint, attempt to force the OS to issue these writes to the underlying stor
PostgreSQL DBA(65) - checkpoint_completion_target参数解析
本文介绍了checkpoint_completion_target参数对checkpoint调度的影响.PostgreSQL对checkpoint过程的调度,与数据库在运行过程中产生日志的大小和时间两个维度相关.
PostgreSQL 源码解读(214)- 后台进程#13(checkpointer-IsCheckpointOnSchedule)
本节介绍了checkpoint中用于控制checkpoint刷盘频率的函数:IsCheckpointOnSchedule.
PostgreSQL DBA(64) - Extension(pg_qualstats)
pg_qualstats是PostgreSQL的一个extension,用于统计WHERE/JOIN语句中出现的谓词。 pg_qualstats is a PostgreSQL extension keeping statistics on predicates found in WHERE statements and JOIN clauses.This is useful if you
PostgreSQL DBA(63) - Extension(pg_stat_statements)
pg_stat_statements提供了一种跟踪所有SQL语句的手段。 进入pg_stat_statements目录,执行make/make install [pg12@localhost pg_stat_statements]$ ls expected pg_stat_statements--1.4--1.5.sql pg_stat_s
PostgreSQL 源码解读(213)- 后台进程#12(checkpointer-CheckpointWriteDelay)
本节介绍了checkpoint中用于控制checkpoint刷盘频率的函数:CheckpointWriteDelay.
PostgreSQL DBA(62) - PG 12 More progress reporting
PostgreSQL 12新增了pg_stat_progress_cluster,用以统计database的活动进度,加强了数据库的易用性.
PostgreSQL 源码解读(212)- 后台进程#11(checkpointer-SyncOneBuffer)
本节介绍了checkpoint中用于刷一个脏page的函数:SyncOneBuffer,该函数在syncing期间处理一个buffer.
PostgreSQL 源码解读(211)- 后台进程#10(checkpointer-BufferSync)
本节介绍了checkpoint中用于刷盘的函数:BufferSync,该函数Write out all dirty buffers in the pool(把缓冲池中所有脏页持久化到物理存储中). 值得一提的是:checkpoint只会处理在checkpoint开始时的脏页(标记为BM_CHECKPOINT_NEEDED),
PostgreSQL DBA(61) - zedstore:想说爱你不容易
本节继续介绍zedstore,在CentOS 7.4进行”大批量”(不过1000w行)数据的测试,zedstore在执行avg时直接coredump. testdb=# create table t_ap_heap (id1 int,id2 int,id3 int,id4 int,id5 int ,id6 int,id7 int,id8 int,id9 int); CREATE TABLE
PostgreSQL DBA(60) - 列式存储zedstore
本节简单介绍了Greenplum开源的列式存储zedstore的安装和使用. 安装从Github上下载源码,与普通PG一样,编译安装即可 [root@localhost postgres-zedstore]# ./configure --enable-debug --with-python --with-perl --with-tcl --with-gssapi --with-pam --wi
PostgreSQL DBA(59) - Index(Bloom)
本节简单介绍了PostgreSQL中的Bloom索引,包括Bloom索引的基础知识和结构等. 简介Bloom Index源于Bloom filter(布隆过滤器),布隆过滤器用于在使用少量的空间的情况下可以很快速的判定某个值是否在集合中,其缺点是存在假阳性False Positives,因此需要Recheck来判断该值是否在集合中,但布隆过滤器不存在假阴性,也就是说,对于某个值如果过滤器返回不存
PostgreSQL DBA(58) - DBLink
本节介绍了contrib中的dblink插件,该插件可用于连接远程PG数据库,看起来像是Oracle的DBLink.
PostgreSQL DBA(57) - Could not choose a best candidate operator
本节内容来源于客户现场反馈的一个问题.Question创建了integer到text的cast后,为何执行字符串连接”||”操作报错? testdb=# drop table if exists t_cast ; DROP TABLE testdb=# create table t_cast (id int); CREATE TABLE testdb=# insert into t_ca
PostgreSQL DBA(56) - Why does checkpointer use so much memory
本节内容来源于PGer的一个问题:Q:为什么checkpointer后台进程使用这么多内存? [pg12@localhost ~]$ ps -aux|grep postgres pg12 1506 0.0 1.8 753156 34704 ? Ss 10:30 0:00 /appdb/xdb/pg12beta1/bin/postgres pg12
PostgreSQL 源码解读(210)- 隐式类型转换(func_match_argtypes)
本节简单介绍了PostgreSQL隐式类型转换中使用哪些操作符(pg_operator)的实现函数func_match_argtypes.