- 博客(22)
- 资源 (5)
- 收藏
- 关注
原创 mongodb 使用 profile + mtools 来分析慢查询
os:centos 7.4 mongdbo:3.2 mtools:1.4.1mongodb 是一款优秀的nosql数据库,高灵活性和高性能。所以有必要监控mongodb的慢查询,以便进一步缩短响应时间。 mtools是一组用来解析和过滤MongoDB日志文件的脚本。profile 设置由于是初次设置,定义慢查询为 1000ms。db.getProfilingLevel...
2018-05-31 21:01:52 1148
原创 USE_PGXS 在 extension 编译中的作用
postgresql 在编译 extension时经常要使用 pgxs,如下:# source /var/lib/pgsql/.bash_profile# USE_PGXS=1 make # USE_PGXS=1 make install 下面简单分析一下:某个具体 contrib 的 Makefile文件# PGXS build needs PostgreSQL 9.2...
2018-05-30 16:31:33 5348
原创 postgresql 9.x 10.x 的 pg_dumpall 备份数据库
前一段时间使用pg_dump备份了单个数据库,今天试了下 pg_dumpall。pg_dumpall -U postgres -h 127.0.0.1 -p 54320 -v -f /var/lib/pgsql/10/pgdumpall_20180529 中间会看到如下日志pg_dumpall: dumping database "mondb"...pg_dumpall: r...
2018-05-29 17:10:15 1952
原创 postgresql 9.x 的base backup + restore + pitr(point in time recovery)
os: centos6.8 postgresql:9.1.22base backup最初使用 tar 花费4个小时,之后改为 pigz 只花费了30分钟。# vi /backup_scripts/pg_basebackup.sh#!/bin/bashDATE=`date +%Y%m%d`#删除14天前的物理备份echo "#####################...
2018-05-24 20:48:15 416
原创 postgresql 使用 analyze 收集统计信息
os: centos7.4 postgresql:9.6.8查看os进程$ ps -ef|grep -i post |grep -i statpostgres 10782 10770 0 May09 ? 00:02:42 postgres: stats collector process表的信息mondb=# select pg_size_pre...
2018-05-23 18:32:06 9086
原创 postgresql 监控 table、column 的备注
最近在整理postgresql数据库的表、列的备注信息时,用到了如下的sql表的备注with tmp_tab as ( select pc.oid,pc.* from pg_class pc where 1=1 and pc.relkind in ('r') and pc.relnamespace = 2200 -- sele...
2018-05-22 16:43:56 7535
原创 redis cluster 4.0.9 之三: startup stop
os: centos7.4 redis:4.0.9 ruby:2.3.4ip 规划redis1 192.168.56.101redis2 192.168.56.102用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口, 192.168.56.102 的 9001、9002、9003 端口。...
2018-05-21 19:11:32 547
原创 redis cluster 4.0.9 之二: failover
os: centos7.4 redis:4.0.9 ruby:2.3.4ip 规划redis1 192.168.56.101redis2 192.168.56.102用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口, 192.168.56.102 的 9001、9002、9003 端口。...
2018-05-21 19:05:01 608
原创 oracle ebs r12 打补丁的步骤
os: linux 5.8 ebs:12.1.3 patch:14332598这里以 p14332598 为例,列出打补丁的过程。查看补丁SELECT * FROM ad_applied_patches where 1=1 and patch_name in ('14332598') ; SELECT * FROM ad_bugs where 1...
2018-05-20 19:06:36 1893
原创 redis cluster 4.0.9 之一: make && make install
os: centos7.4 redis:4.0.9 ruby:2.3.4ip 规划redis1 192.168.56.101redis2 192.168.56.102用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口, 192.168.56.102 的 9001、9002、9003 端口。...
2018-05-18 17:22:12 1083
转载 pgpool 之三 pgpool的几种模式
pgpool:3.7.3文档 http://www.pgpool.net/docs/latest/en/html/configuring-pgpool.html4.3.2. Running mode of Pgpool-IIThere are four different running modes in Pgpool-II: streaming replication mode, ...
2018-05-16 15:47:43 1263
原创 pgpool 之二 stream replication 模式 + slave down up
os: centos7.4 postgresql:9.6.8 pgpool:3.7.3采用 streaming replication mode 模式,这是比较通用的方案。 The streaming replication mode can be used with PostgreSQL servers operating streaming replication. In this ...
2018-05-16 15:24:51 3353
原创 pgpool 之一 1 pgpool + 2 postgresql stream replication 模式
os: centos7.4 postgresql:9.6.8 pgpool:3.7.3pgpool 简介准确的名字是Pgpool-II,这里简称为pgpool。pgpool 是介于postgresql 服务和 postgresql 客户端的中间件。它提供如下功能: 1、连接池 2、复制 3、负载均衡 4、限制超过限度的连接 5、并行查询具有如下工作模式: 1、原始模...
2018-05-16 13:59:55 1847
原创 postgresql 函数的三个状态
postgresql 的函数有三个状态:IMMUTABLE、STABLE、VOLATILE。这个是与其他数据库有明显概念差别的。简单描述如下: IMMUTABLE 表示该函数不能修改数据库并且对于给定的参数值总是会返回相同的值。也就是说,它不会做数据库查找或者使用没有在其参数列表中直接出现的信息。如果给定合格选项,任何用全常量参数对该函数的额调用可以立刻用该函数值替换。 STA...
2018-05-13 15:14:20 876
原创 fdw postgres_fdw
fdw:foreign data wrapper,postgresql的外部数据包装器。 postgres_fdw 是用于postgresql的数据库之间连接,原因是postgresql不能直接跨库访问,被设计用来替代dblink。 这么口语化的描述,大家应该一下子就清楚了。postgres=# select * from pg_available_extensions p where...
2018-05-09 14:30:56 1081
原创 greenplum 5.7 + gpcheckcat
gpcheckcat查看帮助[gpadmin@node1 bin]$ gpcheckcat -?Usage: gpcheckcat [<option>] [dbname] -? -B parallel: number of worker threads -g dir : generate SQL to rectify catalog c...
2018-05-08 20:15:16 582
原创 greenplum 5.7 + gpcheck
gpcheck查看帮助[gpadmin@node1 bin]$ gpcheck --helpCOMMAND NAME: gpcheckVerifies and validates Greenplum Database platform settings.*****************************************************SYNOPSIS...
2018-05-08 20:13:22 717
原创 greenplum 5.7 + gp_toolkit
gp_toolkit 是 greenplum的一个功能schema。包含了大量实用的函数。[gpadmin@node1 gpseg-1]$ psql -d peiybdbpsql (8.3.23)Type "help" for help.peiybdb=# \dnS+ List of ...
2018-05-08 15:33:52 1126
原创 pgcrypto
pgcrypto模块为PostgreSQL提供了密码函数。 简单使用了一下。创建pgcryptomondb=# create extension pgcrypto;CREATE EXTENSION加密mondb=# select encrypt('123我men','aa','aes'); encrypt ------...
2018-05-07 10:03:05 1363
原创 greenplum 5.7 + create table + insert into
os: centos 7.4 gp: gpdb-5.7.0三台机器 node1 为master host node2、node3为segment hostpsql 登录 node1 master$ psql -d peiybdbpeiybdb=# select current_database(); current_database ------------------...
2018-05-02 17:45:33 2002
原创 greenplum 5.7 + connection master segment
os: centos 7.4 gp: gpdb-5.7.0三台机器 node1 为 master host node2、node3 为 segment hostpsql 登录 masternode1 上操作# su - gpadmin$ psql -d peiybdbpsql (8.3.23)Type "help" for help.peiybdb=# \l ...
2018-05-02 15:05:06 407
原创 oracle ebs 12.1.3 的opmn.xml
opmn.xml 是由autoconfig生成的重要参数配置文件。通常的路径如下: /ebsfs/EBSPROD/inst/apps/EBSPROD_erp/ora/10.1.3/opmn/conf/opmn.xml通过调整java的启动参数和numprocs 可以提升系统的负载。文件描述<!-- $Header: opmn_xml_1013.tmp 120.22.1201...
2018-05-01 18:17:45 696
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人