今日看了这篇博文: https://medium.com/namely-labs/syncing-cache-with-postgres-7a4d78cec022 再一次感叹PG的强大。原来PG还可以通过pg_notify 这个方法,再加上触发器,去主动告诉外界数据的变化。 看了博文后...
分类:
数据库 时间:
2015-09-11 17:49:19
阅读次数:
343
1.Heroku https://dashboard.heroku.com/apps2.文档 https://devcenter.heroku.com/articles/getting-started-with-django3.error:"pg_config executable not fo.....
分类:
其他好文 时间:
2015-09-11 10:36:31
阅读次数:
125
brew?install?postgresql
mkdir?-p?/usr/local/var/postgres
initdb?/usr/local/var/postgres/data
mkdir?-p?/usr/local/var/log/postgres
pg_ctl?start?-D?/usr/local/var/postgres/data?-l?/usr/lo...
分类:
数据库 时间:
2015-09-10 16:12:29
阅读次数:
217
一、准备 连接上master节点创建replication用户 #?CREATE?ROLE?replicator?with?login?replication?password?123456; 修改白名单pg_hba.conf #?host????replication????all????????xxx...
分类:
数据库 时间:
2015-09-08 15:40:31
阅读次数:
379
一、备份 1. 需要保证archive_mode = on 和 archive_command是有效的 2. 在master节点上连接上数据库并执行 SELECT?pg_start_backup(‘label‘,?true); pg_start_backup第二个参数设置为true的好处是备份开始会执...
分类:
数据库 时间:
2015-09-08 12:45:49
阅读次数:
247
一、 安装 PostgreSQL版本是9.4.4 #?git?clone?-b?REL9_4_STABLE?https://github.com/ossc-db/pg_rman.git
Initialized?empty?Git?repository?in?/opt/pg_rman/.git/
remote:?Counting?objects:?193...
分类:
数据库 时间:
2015-09-07 18:12:32
阅读次数:
403
一、 备用同步复制节点down了 postgres=#?select?*?from?pg_stat_replication?;
??pid??|?usesysid?|?usename??|?application_name?|?client_addr?|?client_hostname?|?client_port?|???...
分类:
数据库 时间:
2015-09-06 16:28:56
阅读次数:
197
在shell中用命令pg_dump将数据库data1导出到一个文件中pg_dump -d data1 -f test.txt或者pg_dump -d data1 > test.sql然后再创建一个空库createdb data2用psql命令把data1的数据导入到data2psql -d dat....
分类:
数据库 时间:
2015-09-04 12:23:22
阅读次数:
160
ubuntu通过软件中心安装后,配置文件位于如下目录我用超级用户创建了其它数据库用户,发现是登录不了的,必须还得创建同名的linux用户,甚是麻烦。在配置文件pg_hba.conf中发现了问题。其中的local all all peer这条设置要改变一下,第一个参数是loc...
分类:
数据库 时间:
2015-09-03 23:20:31
阅读次数:
257
需求:过滤下面这个网页里共723行 校对中里 行数为两位数的 行 并设置sz和rz在Windows和Linux之间发送和接收文件不用搭FTP需求:过滤下面这个网页里共723行 校对中里 行数为两位数的 行因为翻译当然要选择行数少的来翻译,翻译PG文档https://github.com/postgr...