试用即将发行的PostgreSQL 15的人会发现少了一个后台进程:​ postgres 1710 1 0 04:03 ? 00:00:00 /usr/pgsql-15/bin/postmaster -D /var/lib/pgsql/15/data/ postgres 1711 1710 0 04:03 ? 00:00:00 postgres: logger postgres 1712 1710 0 04:03 ? 00:00:00 postgres: checkpointer postgre…
Get the current free disk space in PostgreSQL PostgreSQL获取磁盘空间 from eshizhan Here has a simple way to get free disk space without any extended language, just define a function using pgsql. CREATE OR REPLACE FUNCTION sys_df() RETURNS SETOF text[] LANG…
详情见官网:http://www.postgres.cn/docs/10/functions-formatting.html PostgreSQL中有以下格式化函数: 函数 返回类型 描述 例子 to_char(timestamp, text) text 把时间戳转成字符串 to_char(current_timestamp, 'HH12:MI:SS') to_char(interval, text) text 把间隔转成字符串 to_char(interval '15h 2m 12s', 'H…
1.删除/新增数据库    DROP DATABASE "testDB";    CREATE DATABASE "testDB" WITH OWNER = test_user;2.删除/新增模式    DROP SCHEMA "testSchema" ;    CREATE SCHEMA "testSchema" AUTHORIZATION postgres;3.删除/新增表    DROP TABLE "test…
1.创建一个函数function1 -- FUNCTION: public.function1(character varying, integer) -- DROP FUNCTION public.function1(character varying, integer); CREATE OR REPLACE FUNCTION public.function1( useridl character varying, groupidl integer) RETURNS TABLE(vehicle…
1.准备好创建函数的脚本 -- FUNCTION: public.dynamic_placelist_select(integer, timestamp without time zone) -- DROP FUNCTION public.dynamic_placelist_select(integer, timestamp without time zone); CREATE OR REPLACE FUNCTION public.dynamic_placelist_select( eigyou…
  [fsp@controller-21 ~]$ openstack --version ##fusionsphere 6.1基于openstack 2.2.1 [fsp@controller-21 ~]$ ps -ef|sort  ##查看系统进程UID,对应的PID和PPID,服务运行路径 [fsp@controller-21 ~]$ netstat -lntup  ##根据PID查看服务监听的端口信息 FusionSphere 6.1服务与组件 服务 组件 端口 功能 sql gauss…
1.实验环境 OS: RedHat Linux Enterprisedb 6.3 DB: postgresql 9.3 PGHOME: /opt/PostgreSQL/9.3 PGDATA: /opt/PostgreSQL/9.3/data 归档目录:/opt/pg_archive 基础备份目录:/opt/base_archive --生产环境中归档和数据等目录应该放在不同的分区,或者存储上. 2.修改归档配置,添加测试数据 修改pg配置文件postgresql.conf中以下条目 wal_le…
环境:Linux localhost.localdomain 2.6.32-431 GNU/Linux x86_64 Postgresql版本:postgresql.9.5.3 添加开启自启设置:http://my.oschina.net/ensn/blog/690719 1.下载postgresql 因bz2格式包格式比较小,故选择该格式下载.地址:https://www.postgresql.org/ftp/source/v9.5.3/ 2.安装: 2.1 解压: tar jxvf post…
[root@test02 init.d]# ll /etc/init.d/postgresql-9.5 -rwxr-xr-x. 1 root root 10072 May 15 06:34 /etc/init.d/postgresql-9.5 1. 检查PostgreSQL 是否已经安装 # rpm -qa|grep postgres 若已经安装,则使用rpm -e 命令卸载 [root@test02 bin]# rpm -qa|grep postgres postgresql-8.4.18-1…