Time of Update: 2017-01-13
背景對於金融級的應用情境,2個副本通常是不夠的,使用者可能會需要多個副本。例如,一主4從,要求除了主以外,還需要2個同步的副本,其他可以為非同步副本。 另一方面,我們在使用資料庫時,為了擴充讀的能力,讀寫分離是比較常見的用法。9.6以前的版本,同步複製是確保XLOG已經複製到備庫,而不是已經在備庫apply,雖然APPLY通常都很快,可能也在毫秒層級完成,但是以前沒有apply層級的同步機制。例如,使用者A往使用者B的賬戶匯了一筆錢,同一時間使用者B在異地馬上要看到A匯過來的錢,這種異
Time of Update: 2017-01-13
簡單說明路徑 代碼如下複製代碼 /var/lib/postgresql/9.3/查看版本psql --version 建立使用者樣本: 建立 yy 使用者, 密碼為 yy , 建立 blogbase 資料庫,並對 yy 使用者賦予所有許可權 代碼如下複製代碼 $ sudo su - postgres$ psqlpostgres=# CREATE USER yy WITH PASSWORD 'yy';CREATE ROLEpostgres=#
Time of Update: 2017-01-18
在SQL的標準中事物隔離等級分為以下四種: 1. 讀未提交(Read uncommitted) 2. 讀已提交(Read committed) 3. 可重複讀(Repeatable read) 4. 可序列化(Serializable)
Time of Update: 2017-01-18
PostgreSQL在CentOS上部署的時候,需要設定一些作業系統的參數,官方文檔上列舉了一些(傳送門)。除了這些,還有一些其他的設定,如單個使用者允許的最大進程數,單個進程的最大控制代碼數等,這些一般也需要調整,否則系統會在一些條件下出現問題,或者效能下降。下面從系統資源限制類和記憶體參數最佳化類來進行說明.系統資源限制類1.單個使用者允許的最大進程數:linux系統預設是1024,如果PG的最大串連數超過1024,則實際的串連數會小於1024(PG的postmaster進程,checkpo
Time of Update: 2017-01-18
CentOS7 PostgreSQL安裝Install安裝使用yum安裝yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpmyum install postgresql94-server postgresql94-contrib設定開機啟動systemctl enable postgresql-9.4.servicesystemctl start
Time of Update: 2018-02-28
標籤:postgresqlWindows 下服務檢查首頁查看服務是否運行尋找postgresql服務服務正在運行執行命令命令列管理開啟cmd命令列串連資料庫命令接入PostgreSQL資料庫: psql -h IP地址 -p 連接埠 -U 資料庫名有可能會出現錯誤:這種情況下需要做一下postgresql的環境變數配置在c盤的安裝目錄下找到bin檔案夾設定環境變數介面設定右鍵”我的電腦”點擊屬性,彈出屬性,再點擊進階設定彈出進階設定介面點擊“系統設定”上的“環境變數”彈出環境變數設定按鈕選中“
Time of Update: 2017-12-08
標籤:class 情況下 支援 pid pen 經驗 get 包括 sch 項目從Oracle移植到PostgreSQL(9.4版)後,這幾天又出現故障,經跟蹤定位,確定原因是調用PgDatab
Time of Update: 2017-12-08
標籤:dump 配置 host markdown star gre 遠程 服務端 檔案 mac預設安裝postgresql,
Time of Update: 2017-10-31
標籤:sdl mod stand port .sh 安裝出錯 檔案的 jks default 1. 安裝環境說明筆者在原生虛擬機器下進行的安裝,資料庫已經裝好了的。ubuntu16.04 x64
Time of Update: 2017-10-19
標籤:break values https now() split arch cas 單位 ima 資料庫中進行表的連結查詢比使用in的速度是要快的,怎樣在程式中避免使用in?&nb
Time of Update: 2017-10-11
標籤:pub/sub postgresql10 1.初始化配置1).pubdbpostgres=# create database pubdb;postgres=# \c pubdb You are now connected to database "pubdb" as user "postgres".pubdb=# create table t1(id bigserial primary key, name
Time of Update: 2017-10-04
標籤:postgresql二進位快速安裝二進位安裝步驟:groupadd postgres useradd -g postgres postgres id postgres passwd postgres mkdir -p /data/postgresql/data mkdir -p /data/postgresql/log tar xf
Time of Update: 2017-09-16
標籤:bad err 版本 圖片 開啟 項目配置 ext connect htm https://www.2cto.com/database/201707/658910.html開發環境Visu
Time of Update: 2017-09-01
標籤:pg_probackup postgresql 10測試環境說明OS:CentOS Linux release 7.3.1611 (Core) X64PG:pg10 beta3 source installpg_probackup: 2.0.3 source install建立歸檔備份目錄[[email protected] ~]# mkdir /backupdir[[email protected] ~]# chown postgres.postgres -
Time of Update: 2017-08-11
標籤:container contain alt script 資訊 move 根據 focus ima PostgreSQL
Time of Update: 2017-07-27
標籤:src ack 系統 error tac 狀態 複製 rda 方便 在postgresql9.2中遇到一個錯誤,就是在流複製模式下,如果用psql訪問備機,無論執行什麼SQL語句,都會報E
Time of Update: 2016-11-18
標籤:his ubuntu rest 虛擬 開放 init key pack title 前言如題,本篇blog記錄一下在Linux CentOS
Time of Update: 2016-10-29
標籤:drive dbn close val com package word pac sel package mainimport ( "database/sql" "
Time of Update: 2016-09-13
標籤:接前文postgresql編譯安裝與調試(一),繼續說說postgresql的編譯安裝與調試。上一篇已經詳細說明了如何在Linux系統上編譯安裝postgresql,這次我們在此基礎上簡單講講如何在linux系統上調試和追蹤代碼。我記得之前看過一篇關於posgresql的文章,postgresql最早只有20萬左右的代碼量,而如今已經過100萬行了,如此巨大的代碼量,在沒有綱領的前提下簡直是盲人摸象。為方便調試工作,在進入具體的調試之前,我們先來好好瞭解下postgresql的代碼體繫結構
Time of Update: 2016-09-09
標籤:0. 協助$/home/lhl/az/pg/bin/pg_ctl --helppg_ctl is a utility to initialize, start, stop, or control a PostgreSQL server.Usage: pg_ctl init[db] [-D DATADIR] [-s] [-o "OPTIONS"] pg_ctl start [-w] [-t SECS] [-D DATADIR] [-s] [-l