# 前言在 PostgreSQL 中可以设置字符串排序,字符归类方法,数值格式,日期格式,时间格式,货币格式。比较常见的是字符串排序以及字符分类| LC_COLLATE | String sort order || ----------- | --------------... pg_encoding_to_char(encoding) as encoding from pg_database; datname | encoding -----------+---------- postgres | UTF8 template1 | UTF8 template0 | UTF8 dbtest | UTF8 dbtest1 | UTF8(5...
RDS for PostgreSQL 消耗的存储空间主要包含如下方面:1. 数据文件2. WAL 日志3. 未消耗的 replication slot4. 数据库日志5. 临时文件6. ……在我们进行排查此问题时,可以从这个方面进行。由于篇幅限制,本章内容仅包含数据文件部分,其他方面请查看后续文章[1]。# 解决方案### 显示数据库的大小```Plain Textpostgres=# select pg_database.datname, pg_size_pretty (pg_database_size(oid)) AS size from pg_databas...
RDS for PostgreSQL 消耗的存储空间主要包含如下方面:1. 数据文件2. WAL 日志3. 未消耗的 replication slot4. 数据库日志5. 临时文件6. ……在我们进行排查此问题时,可以从这个方面进行。由于篇幅限制,本章内容仅包含数据文件部分,其他方面请查看后续文章[1]。# 解决方案### 显示数据库的大小````undefinedpostgres=# select pg_database.datname, pg_size_pretty (pg_database_size(oid)) AS size from pg_databas...
# 前言在 PostgreSQL 中可以设置字符串排序,字符归类方法,数值格式,日期格式,时间格式,货币格式。比较常见的是字符串排序以及字符分类| **LC_COLLATE** | **String sort order** || --- | --- || LC_CTYPE | ... pg_encoding_to_char(encoding) as encoding from pg_database; datname | encoding -----------+---------- postgres | UTF8 template1 | UTF8 template0 | UTF8 dbtest | UTF8 dbtest1 | UTF8(5...
postgres=# select pg_relation_filepath('test_t'); pg_relation_filepath ---------------------- base/13593/50548(1 row)postgres=# alter table test_t alter column c1 type text;ALTER TABLE//可以... postgres=# select pg_relation_filepath('test_t'); pg_relation_filepath ---------------------- base/13593/50554(1 row)```# 操作建议PostgreSQL 支持在事务中运行 DDL 语句,建议将 DDL 封装在事务中...
Postgres CDC 暂不支持在全表扫描阶段执行 Checkpoint。当scan.incremental.snapshot.enabled=false(默认配置)时,如果任务在全表扫描阶段触发 Checkpoint,则可能由于 Checkpoint 超时导致任务 Failover。因此,建议您在 Flink 参数中配置 Checkpoint 时间间隔,以及配置 Task 重启策略,以避免在全量同步阶段由于 Checkpoint 超时导致任务 Failover。 DDL 定义SQL CREATE TABLE pgsql_source ( order_id bigint, order_customer_...
# 问题描述PostgreSQL 数据库中如果有长时间未提交的 2PC,会对数据库造成哪些影响。```Plain Textrudonx=> begin;BEGINrudonx=> insert into accounts values(1,100);INSERT 0 1rudonx=> prepare transacti... rudonx=> alter table accounts ADD COLUMN pc int;rudonx=> select * from pg_stat_activity\gx-[ RECORD 9 ]----+--------------------------------------------datid | 25554datname ...
# 问题描述在日常管理 PostgreSQL,有时候我们需要对不需要使用的用户进行删除,有可能会出现删除不了的情况,报错如下:```sqlrudonx=# drop user rudonx1;ERROR: role "rudonx1" cannot be dropped because som... column? ------------------------------------------------------ alter table "public"."ttt" owner to username;\r alter table "public"."ttt1" owner to username;\r alter table ...
# 问题描述在日常管理 PostgreSQL,有时候我们需要对不需要使用的用户进行删除,有可能会出现删除不了的情况,报错如下:```sqlrudonx=# drop user rudonx1;ERROR: role "rudonx1" cannot be dropped because s... column? ------------------------------------------------------ alter table "public"."ttt" owner to username;\r alter table "public"."ttt1" owner to username;\r alter table ...
# 前言PostgreSQL 在 9.1 中推出了一种特殊的表:unlogged table,使用 unlogged table 最大的特点是涉及到表的更新,删除等操作不会记录 WAL 日志,这样可以大大的提高性能。不过需要特别注意的是,在数据库异常宕机... 如运行 kill -9 postgresql_pid,数据库重启时自动清空unlogged table的数据。4. 如果正常关闭数据库,如(pg_ctl stop -D /home/pgsql11.5/data/ -m fast),再启动时,unlogged table 中是有数据的。同时,unlogged...
# 前言PostgreSQL 在 9.1 中推出了一种特殊的表:unlogged table,使用 unlogged table 最大的特点是涉及到表的更新,删除等操作不会记录 WAL 日志,这样可以大大的提高性能。不过需要特别注意的是,在数据库异常宕机时... 如运行 kill -9 postgresql_pid,数据库重启时自动清空unlogged table的数据。4. 如果正常关闭数据库,如(pg_ctl stop -D /home/pgsql11.5/data/ -m fast),再启动时,unlogged table 中是有数据的。同时,unlogged ...
本文汇总了云数据库 PostgreSQL 版的数据库保留关键词。 参数字段 关键字描述 AccountName、DBName 或 SchemaName authorization,binary,byte_rds_proxy,collation,concurrently,cross,current_schema,freeze,full,ilike,inner,is,isnull,join,left,like,natural,notnull,outer,overlaps,right,similar,tablesample,verbose,all,analyse,analyze,and,any,array,as,asc,asymmetric,both,case,cast,check,collate,column,constra...
Column:表示列。 Function:表示函数。 Procedure:表示程序。 Trigger:表示触发器。 Type:表示类型。 Domain:表示域名。 Sequence:表示序列。 Rule:表示规则。 Operator:表示操作符。 Aggregate:表示聚合。 Extension:表示扩展。 Constraint:表示约束。 PostSequence:表示 PostgreSQL 的序列。当参数为 PostgreSQL 时,需配置此参数。 Schema:表示模式。 Event:表示事件。 DomainConstraint:表示域约束。 Name ...