Time of Update: 2017-01-13
說明在安裝pgbouncer之前,已安裝了postgres 軟體下載:wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gzwget http://pgfoundry.org/frs/download.php/3393/pgbouncer-1.5.4.tar.gz 編譯安裝libeventtar zxf libevent-2.0.21-stable.tar.gzcd
Time of Update: 2017-01-13
PostgreSQL是以加州大學伯克利分校電腦系開發的 POSTGRES, Version
Time of Update: 2017-01-13
背景PostgreSQL 9.6動態視圖pg_stat_activity新增了wait_event_type,
Time of Update: 2017-01-13
代碼如下複製代碼 執行個體講解3.1 查看儲存一個指定的數值需要的位元組數david=# select pg_column_size(1); pg_column_size ---------------- 4(1 row)david=# select
Time of Update: 2017-01-18
擷取系統時間函數select now(); --2013-11-28 16:20:25.259715+08select current_timestamp; --2013-11-28 16:20:38.815466+08select current_date; --2013-11-28select current_time; --16:21:08.981171+08時間的計算 --使用intervalselect now()+interval '2 day'; -
Time of Update: 2017-01-18
一個資料庫包含一個或多個命名的模式,模式又包含表。模式還包含其它命名的對象,包括資料類型、函數,以及操作符。同一個對象名可以在不同的模式裡使用而不會導致衝突; 比如,schema1和myschema都可以包含叫做mytable的表。和資料庫不同,模式不是嚴格分離的:一個使用者可以訪問他所串連的資料庫中的任意模式中的對象,只要他有許可權。 我們需要模式有以下幾個主要原因: 1).
Time of Update: 2017-01-18
這裡用一個執行個體來示範PostgreSQL預存程序如何返回資料集。1、首先準備資料表複製代碼 代碼如下://member_categorycreate table member_category(id serial, name text, discount_rate real, base_integral integer);alter table member_category add primary key(id);alter table member_category add check(
Time of Update: 2017-01-19
從頭開始搭建一個mybatis+postgresql平台 最近有個項目的資料庫使用postgresql,使用原生態的mybatis操作資料,原生態的沒什麼不好,只不過國內有個tk.mybatis的工具協助我們做了很多實用的事情,大多數情況下我們需要在原生態mybatis上加工的想法它基本上都已經有很好的實現,這篇將分享安裝postgresql,配置tk.mybatis的詳細步驟以及在這過程中可能遇到的一些小問題。安裝postgresql,執行下面的命令就可以安裝了:複製代碼
Time of Update: 2017-01-12
標籤:postgresql9.6 centos71.pgdg-centos96-9.6-3.noarch.rpmPostgreSQL 9.6--》CentOS 7 - x86_64下載連結:https://yum.postgresql.org/repopackages.phprpm -ivh pgdg-centos96-9.6-3.noarch.rpm2.postgresql96-server# yum install -y postgresql96-server# yum install
Time of Update: 2016-11-21
標籤:add 串連數 協助資訊 用戶端 表示 tty 無法串連 nes 遠程 前言之前的部落格記錄了通過rpm包的形式安裝PostgreSQL 9.3(Linux CentOS 7
Time of Update: 2016-06-06
標籤:1. 安裝file_fdw需要先安裝file_fdw,一般是進到PostgreSQL的源碼包中的contrib/file_fdw目錄下,執行:makemake install然後進入資料庫中,執行以下SQL把file_fdw安裝上:CREATE EXTENSION file_fdw;CREATE SERVER file_fdw_server FOREIGN DATA WRAPPER file_fdw;2.
Time of Update: 2016-05-31
標籤:什麼是barmanBarman (備份和復原管理員) 是 PostgreSQL 資料庫伺服器中非常方便的備份和恢複工具,允許遠程備份多個伺服器,允許從一個備份組中一個命令就恢複資料庫。同時還可以對多個備份組進行方便的管理.環境說明環境有兩台機器:192.168.1.21 主要資料庫所在主機192.168.1.22 為barman備份機安裝barman到barman的官方網站http://www.pgbarman.org/下載barman安裝包,把安裝包拷貝到192.168.1.22機器上,
Time of Update: 2016-05-21
標籤:http://my.oschina.net/hippora/blog/375292下載源碼並解壓[root@fnddb ~]# wget https://ftp.postgresql.org/pub/source/v9.4.0/postgresql-9.4.0.tar.bz2[root@fnddb ~]# tar -xjvf postgresql-9.4.0.tar.bz2 [root@fnddb ~]# cd
Time of Update: 2016-05-18
標籤:http://timmurphy.org/tag/mysql/http://timmurphy.org/2009/11/17/use-schema_name-in-postgresql/ ====================================For those moving from MySQL to PostgreSQL, there are a few differences which you will need to get used to.
Time of Update: 2016-05-13
標籤:postgreSQL在linux中安裝詳解 收藏 這裡安裝8.4.4版本,首先下載postgresql-8.4.4-1-linux.bin。(http://www.postgresql.org/download/)下載linux32版本的1.
Time of Update: 2016-04-22
標籤:PostgreSQL和PostGIS的安裝主要有兩種方式,從源碼安裝和用包管理工具安裝,推薦用包管理工具安裝,下面是在CentOS 7.1 X64 上安裝的具體步驟 安裝YUM repository. 推薦使用 PGDG(PostgreSQL Global Development Group)的repository,這個repository包含官方最新的PostgreSQL及匹配的PostGIS,使用別的repository沒有最新的或者沒有匹配的PostGIS。
Time of Update: 2016-04-13
標籤:PostgreSQL支援管理員直接手動安裝資料庫,給使用者提供了更大的方便。 1. 在PostgreSQL官方網站上下載免安裝二進位的包,名字類似於postgresql-*.*.*.*-binaries-no-installer.tar.gz之類的。下載到本地,解壓到某路徑PATH下。 2. 在PATH目錄中建立data檔案夾,用於存放資料。 3.
Time of Update: 2016-04-07
標籤:1、Explainexplain select * from tablename; 2、explain輸出josn格式explain (format json) select * from tablename;除了json格式,還支援xml、text、yaml等 3、explain analyze查看實際的啟動時間explain analyze select * from tablelname;另一種方法:explain(analyze true) select *
Time of Update: 2016-01-29
標籤:How to debug plpgsql with pgAdminIII[[email protected] soft_bak]# git clone git://git.postgresql.org/git/pldebugger.gitInitialized empty Git repository in /opt/soft_bak/pldebugger/.git/remote: Counting objects: 445, done.remote: Compressing
Time of Update: 2015-12-23
標籤:The bucardo project has released its nagios plugins for PostgreSQL and we can extract from them this nice view in order to check for table and index bloatinto our PostgreSQL databases:下面是檢查資料表空間的使用方式的指令碼:CREATE