SlideShare a Scribd company logo
1 of 106
Pro PostgreSQL Robert Treat omniti.com brighterlamp.org
Who Am I?  (Why Listen To Me) O-0 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Outline O-1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
K-0 Know Your Way Around The Project
Know Your Way Around The Project K-1 www.postgresql.org ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Know Your Way Around The Project K-2 www.pgfoundry.org projects.postgresql.org ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Know Your Way Around The Project K-3 www.planetpostgresql.org ,[object Object],[object Object],[object Object]
Know Your Way Around The Project K-4 archives.postgresql.org ,[object Object],[object Object],[object Object],[object Object]
Know Your Way Around The Project K-5 #postgresql ,[object Object],[object Object],[object Object]
Know Your Way Around The Project K-6 project management ,[object Object],[object Object],[object Object],[object Object],[object Object]
S-0 Get Off To A Good Start
S-1 Get Off To A Good Start Use package management ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],S-2 Get Off To A Good Start Use package management
[object Object],[object Object],[object Object],S-2 Get Off To A Good Start Use package management Don't Be Afraid To Roll Your Own
S-4 Get Off To A Good Start ,[object Object],[object Object],[object Object],[object Object],Configure Logging Logging is often overlooked,  but is the first step toward troubleshooting!
S-5 Get Off To A Good Start ,[object Object],[object Object],[object Object],Configure Authentication
S-6 Get Off To A Good Start ,[object Object],[object Object],[object Object],Authentication Methods
S-7 Get Off To A Good Start ,[object Object],[object Object],[object Object],[object Object],[object Object],/contrib
S-8 Get Off To A Good Start ,[object Object],[object Object],[object Object],[object Object],[object Object],procedural languages
U-0 Let's Talk About Upgrades
U-1 Let's Talk About Upgrades Versioning First Digit ( 7 .4.16 ->  8 .2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3.0 -> 8.3.1)
U-2 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8. 2 .4 -> 8. 3 .0) Third Digit (8.3.0 -> 8.3.1)
U-3 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3. 0  -> 8.3. 1 )
U-4 Let's Talk About Upgrades Achtung!! ,[object Object],[object Object]
U-5 Let's Talk About Upgrades pg_dump/pg_restore ,[object Object],[object Object],[object Object],[object Object]
U-6 Let's Talk About Upgrades the slony method ,[object Object],[object Object],[object Object],[object Object]
U-7 Let's Talk About Upgrades pg_migrator ,[object Object],[object Object],[object Object],[object Object],[object Object]
U-8 Let's Talk About Upgrades upgrading older db ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
C-0 Figure Your Configure
C-1 Figure Your Configure the basics : performance ,[object Object],[object Object],[object Object],[object Object],[object Object]
C-2 Figure Your Configure the basics : logging ,[object Object],[object Object],[object Object],[object Object]
C-3 Figure Your Configure other stuff worth looking at ,[object Object],[object Object],[object Object],[object Object],[object Object]
M-0 Routine Maintenance
M-1 Routine Maintenance a word about vacuum ,[object Object],[object Object],[object Object]
M-2 Routine Maintenance autovacuum : just do it! ,[object Object],[object Object],[object Object],[object Object],[object Object]
M-3 Routine Maintenance other stuff worth looking at ,[object Object],[object Object],[object Object],[object Object]
P-0 Hardware For Software People
P-1 Hardware For Software People you can be cheap on the licensing,  don't be cheap on the hardware ,[object Object],[object Object],[object Object],[object Object],[object Object]
P-2 Hardware For Software People cpu and you ,[object Object],[object Object],[object Object]
P-3 Hardware For Software People disk do's ,[object Object],[object Object],[object Object],[object Object],[object Object]
P-4 Hardware For Software People disk dont's ,[object Object],[object Object],[object Object]
A-0 Availability (Not Scalability)
A-1 Availability what do we mean by availability? ,[object Object],[object Object],[object Object]
A-2 Availability what do we mean by availability? if (kablooy) then  (ok) ,[object Object],[object Object],[object Object]
A-3 Availability pg_dump ,[object Object],[object Object],[object Object],[object Object]
A-4 Availability filesystem snapshots ,[object Object],[object Object],[object Object],[object Object],[object Object]
A-5 Availability pitr ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A-6 Availability slony ,[object Object],[object Object],[object Object],[object Object]
A-7 Availability bucardo ,[object Object],[object Object],[object Object],[object Object]
A-8 Availability shared disk ,[object Object],[object Object],[object Object],[object Object]
A-9 Availability filesystem replication ,[object Object],[object Object],[object Object],[object Object]
A-10 Availability pgpool ,[object Object],[object Object],[object Object],[object Object]
A-11 Availability postgres-r ,[object Object],[object Object],[object Object],[object Object]
H-0 Scalability
H-1 Scalability what is scaling? “ How well a solution to some  problem will work when the  relative size of the problem  increases” - Theo Schlossnagle
H-2 Scalability bigger, better, faster, more! ,[object Object],[object Object],[object Object],[object Object],[object Object]
H-3 Scalability pgpool ,[object Object],[object Object],[object Object],[object Object]
H-4 Scalability pg_bouncer ,[object Object],[object Object],[object Object],[object Object]
H-5 Scalability slony ,[object Object],[object Object],[object Object],[object Object],[object Object]
H-6 Scalability bucardo ,[object Object],[object Object],[object Object],[object Object]
H-7 Scalability pgpool-II ,[object Object],[object Object],[object Object],[object Object]
H-8 Scalability pgcluster ,[object Object],[object Object],[object Object],[object Object],[object Object]
H-9 Scalability postgres-r ,[object Object],[object Object],[object Object],[object Object],[object Object]
H-10 Scalability pitr read-only slaves ,[object Object],[object Object],[object Object],[object Object]
J-0 Query Your Queries
J-1 Query Your Queries finding slow queries: log_min_duration_statement ,[object Object],[object Object],[object Object],LOG:  duration: 5005.273 ms  statement: select pg_sleep(5);
J-2 Query Your Queries finding slow queries: pgfouine / pqa ,[object Object],[object Object],[object Object],http://pgfouine.projects.postgresql.org/reports.html http://pqa.projects.postgresql.org/example.html
J-3 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column  |  Type  | ------------------+-------------+ relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  | n_tup_hot_upd  | bigint  | n_live_tup  | bigint  | n_dead_tup  | bigint  | last_vacuum  | timestamptz | last_autovacuum  | timestamptz | last_analyze  | timestamptz | last_autoanalyze | timestamptz |
J-4 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column  |  Type  | ------------------+-------------+ relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  | n_tup_hot_upd  | bigint  | n_live_tup  | bigint  | n_dead_tup  | bigint  | last_vacuum  | timestamptz | last_autovacuum  | timestamptz | last_analyze  | timestamptz | last_autoanalyze | timestamptz |
J-5 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column  |  Type  | ------------------+-------------+ relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  | n_tup_hot_upd  | bigint  | n_live_tup  | bigint  | n_dead_tup  | bigint  | last_vacuum  | timestamptz | last_autovacuum  | timestamptz | last_analyze  | timestamptz | last_autoanalyze | timestamptz |
J-6 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column  |  Type  | ------------------+-------------+ relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  | n_tup_hot_upd  | bigint  | n_live_tup  | bigint  | n_dead_tup  | bigint  | last_vacuum  | timestamptz | last_autovacuum  | timestamptz | last_analyze  | timestamptz | last_autoanalyze | timestamptz |
J-7 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column  |  Type  | ------------------+-------------+ relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  | n_tup_hot_upd  | bigint  | n_live_tup  | bigint  | n_dead_tup  | bigint  | last_vacuum  | timestamptz | last_autovacuum  | timestamptz | last_analyze  | timestamptz | last_autoanalyze | timestamptz |
J-8 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column  |  Type  | ------------------+-------------+ relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  | n_tup_hot_upd  | bigint  | n_live_tup  | bigint  | n_dead_tup  | bigint  | last_vacuum  | timestamptz | last_autovacuum  | timestamptz | last_analyze  | timestamptz | last_autoanalyze | timestamptz |
J-9 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=#  pg_stat_all_indexes View "pg_catalog.pg_stat_all_indexes" Column  |  Type  | ---------------+--------+ relid  | oid  | indexrelid  | oid  | schemaname  | name  | relname  | name  | indexrelname  | name  | idx_scan  | bigint | idx_tup_read  | bigint | idx_tup_fetch | bigint |
J-10 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=#  pg_stat_all_indexes View "pg_catalog.pg_stat_all_indexes" Column  |  Type  | ---------------+--------+ relid  | oid  | indexrelid  | oid  | schemaname  | name  | relname  | name  | indexrelname  | name  | idx_scan  | bigint | idx_tup_read  | bigint | idx_tup_fetch | bigint |
J-11 Query Your Queries finding slow queries: pg_statio_all_tables pagila=#  pg_statio_all_tables View "pg_catalog.pg_statio_all_tables" Column  |  Type  | -----------------+--------+ relid  | oid  | schemaname  | name  | relname  | name  | heap_blks_read  | bigint | heap_blks_hit  | bigint | idx_blks_read  | bigint | idx_blks_hit  | bigint | toast_blks_read | bigint | toast_blks_hit  | bigint | tidx_blks_read  | bigint | tidx_blks_hit  | bigint |
J-12 Query Your Queries finding slow queries: pg_statio_all_tables pagila=#  pg_statio_all_tables View "pg_catalog.pg_statio_all_tables" Column  |  Type  | -----------------+--------+ relid  | oid  | schemaname  | name  | relname  | name  | heap_blks_read  | bigint | heap_blks_hit  | bigint | idx_blks_read  | bigint | idx_blks_hit  | bigint | toast_blks_read | bigint | toast_blks_hit  | bigint | tidx_blks_read  | bigint | tidx_blks_hit  | bigint |
J-13 Query Your Queries fixing slow queries: explain analyze ,[object Object],[object Object],[object Object],[object Object]
J-14 Query Your Queries fixing slow queries: explain analyze ,[object Object],[object Object],[object Object],[object Object],http://wiki.postgresql.org/Using_EXPLAIN
J-15 Query Your Queries fixing slow queries: indexing (basic) ,[object Object],[object Object],[object Object],[object Object],[object Object]
J-16 Query Your Queries fixing slow queries: indexing (partial) create index address_ba_part_idx  on address (district)  where district = 'Buenos Aires'; ,[object Object],[object Object],[object Object],[object Object]
J-17 Query Your Queries fixing slow queries: indexing (partial) create index customer_active_part_idx  on customer (customer_id)  where activebool is true; ,[object Object],[object Object],[object Object],[object Object]
J-18 Query Your Queries fixing slow queries: indexing (functional) ,[object Object]
J-19 Query Your Queries fixing slow queries: indexing (expressional) create unique index one_true_email_xidx on customer (lower(email)); ,[object Object],[object Object],[object Object],[object Object]
J-20 Query Your Queries fixing slow queries: indexing (expressional) create index fullname_xidx on customer ((first_name||' '||last_name)); ,[object Object],[object Object],[object Object],[object Object]
J-21 Query Your Queries fixing slow queries: full text search ,[object Object],[object Object],[object Object],[object Object]
J-22 Indexing Options full text indexing gist vs. gin ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
N-0 PostgreSQL Tablespaces
N-1 PostgreSQL Tablespaces tablespaces? ,[object Object],[object Object],[object Object],[object Object]
N-2 PostgreSQL Tablespaces tablespaces! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Q-0 PostgreSQL Partitioning
Q-1 PostgreSQL Partitioning partitioning? ,[object Object],[object Object],[object Object],[object Object]
Q-2 PostgreSQL Partitioning partitioning! ,[object Object],[object Object],[object Object],[object Object],http://www.pgcon.org/2007/schedule/events/41.en.html
Q-3 PostgreSQL Partitioning partitioning : key points ,[object Object],[object Object],[object Object],[object Object]
I-0 Other Stuff I Should Mention
I-1 Other Stuff I Should Mention pgcrypto ,[object Object],[object Object],[object Object]
I-2 Other Stuff I Should Mention dblink ,[object Object],[object Object],[object Object],[object Object]
I-3 Other Stuff I Should Mention *-link ,[object Object],[object Object],[object Object],[object Object],[object Object],http://www.pgfoundry.org/   (db link)
I-4 Other Stuff I Should Mention autonomous logging tool ,[object Object],[object Object],[object Object],https://labs.omniti.com/trac/pgsoltools
I-5 Other Stuff I Should Mention snapshot pitr clones ,[object Object],[object Object],[object Object],[object Object],https://labs.omniti.com/trac/pgsoltools
I-6 Other Stuff I Should Mention check_postgres ,[object Object],[object Object],[object Object],http://bucardo.org/check_postgres
I-7 Other Stuff I Should Mention reconnoiter ,[object Object],[object Object],[object Object],https://labs.omniti.com/trac/reconnoiter
I-8 Other Stuff I Should Mention phpPgAdmin ,[object Object],[object Object],[object Object],[object Object],http://phppgadmin.sourceforge.net/
I-9 Other Stuff I Should Mention  ;-) my book?
I-10 Other Stuff I Should Mention  ;-) we're hiring ,[object Object],[object Object],[object Object],[object Object],http://omniti.com/is/hiring
L-0 El Fin

More Related Content

What's hot

Introduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsIntroduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System Administrators
Jignesh Shah
 
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
Wei Shan Ang
 
pgpool-II demonstration
pgpool-II demonstrationpgpool-II demonstration
pgpool-II demonstration
elliando dias
 
plProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancerplProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancer
elliando dias
 
pgpool: Features and Development
pgpool: Features and Developmentpgpool: Features and Development
pgpool: Features and Development
elliando dias
 

What's hot (19)

A brief introduction to PostgreSQL
A brief introduction to PostgreSQLA brief introduction to PostgreSQL
A brief introduction to PostgreSQL
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized World
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4
 
Introduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsIntroduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System Administrators
 
Postgres-BDR with Google Cloud Platform
Postgres-BDR with Google Cloud PlatformPostgres-BDR with Google Cloud Platform
Postgres-BDR with Google Cloud Platform
 
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
 
pgpool-II demonstration
pgpool-II demonstrationpgpool-II demonstration
pgpool-II demonstration
 
plProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancerplProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancer
 
GitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons LearnedGitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons Learned
 
pgpool: Features and Development
pgpool: Features and Developmentpgpool: Features and Development
pgpool: Features and Development
 
Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
 
Automating Disaster Recovery PostgreSQL
Automating Disaster Recovery PostgreSQLAutomating Disaster Recovery PostgreSQL
Automating Disaster Recovery PostgreSQL
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized World
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
Postgresql Database Administration Basic - Day2
Postgresql  Database Administration Basic  - Day2Postgresql  Database Administration Basic  - Day2
Postgresql Database Administration Basic - Day2
 
HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성
 

Viewers also liked

Viewers also liked (19)

Building a Spatial Database in PostgreSQL
Building a Spatial Database in PostgreSQLBuilding a Spatial Database in PostgreSQL
Building a Spatial Database in PostgreSQL
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And Failover
 
My experience with embedding PostgreSQL
 My experience with embedding PostgreSQL My experience with embedding PostgreSQL
My experience with embedding PostgreSQL
 
Why use PostgreSQL?
Why use PostgreSQL?Why use PostgreSQL?
Why use PostgreSQL?
 
Android & PostgreSQL
Android & PostgreSQLAndroid & PostgreSQL
Android & PostgreSQL
 
PostgreSQL Hooks for Fun and Profit
PostgreSQL Hooks for Fun and ProfitPostgreSQL Hooks for Fun and Profit
PostgreSQL Hooks for Fun and Profit
 
PostgreSQL and RAM usage
PostgreSQL and RAM usagePostgreSQL and RAM usage
PostgreSQL and RAM usage
 
Get to know PostgreSQL!
Get to know PostgreSQL!Get to know PostgreSQL!
Get to know PostgreSQL!
 
Data Processing Inside PostgreSQL
Data Processing Inside PostgreSQLData Processing Inside PostgreSQL
Data Processing Inside PostgreSQL
 
Really Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DWReally Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DW
 
Howdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Howdah - An Application using Pylons, PostgreSQL, Simpycity and ExceptableHowdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Howdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep Internal
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
Full Text Search In PostgreSQL
Full Text Search In PostgreSQLFull Text Search In PostgreSQL
Full Text Search In PostgreSQL
 
Cours SIG
Cours SIGCours SIG
Cours SIG
 
alphorm.com - Formation PostgreSQL administration
alphorm.com - Formation PostgreSQL administrationalphorm.com - Formation PostgreSQL administration
alphorm.com - Formation PostgreSQL administration
 
A couple of things about PostgreSQL...
A couple of things  about PostgreSQL...A couple of things  about PostgreSQL...
A couple of things about PostgreSQL...
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
5 Steps to PostgreSQL Performance
5 Steps to PostgreSQL Performance5 Steps to PostgreSQL Performance
5 Steps to PostgreSQL Performance
 

Similar to Pro PostgreSQL, OSCon 2008

Planning for-high-performance-web-application
Planning for-high-performance-web-applicationPlanning for-high-performance-web-application
Planning for-high-performance-web-application
Nguyễn Duy Nhân
 
Creating customized openSUSE versions with SUSE Studio
Creating customized openSUSE versions with SUSE StudioCreating customized openSUSE versions with SUSE Studio
Creating customized openSUSE versions with SUSE Studio
elliando dias
 
Out of the Box Replication in Postgres 9.4(pgconfsf)
Out of the Box Replication in Postgres 9.4(pgconfsf)Out of the Box Replication in Postgres 9.4(pgconfsf)
Out of the Box Replication in Postgres 9.4(pgconfsf)
Denish Patel
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)
Denish Patel
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)
Denish Patel
 

Similar to Pro PostgreSQL, OSCon 2008 (20)

Planning for-high-performance-web-application
Planning for-high-performance-web-applicationPlanning for-high-performance-web-application
Planning for-high-performance-web-application
 
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop Automation
 
Creating customized openSUSE versions with SUSE Studio
Creating customized openSUSE versions with SUSE StudioCreating customized openSUSE versions with SUSE Studio
Creating customized openSUSE versions with SUSE Studio
 
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
 
Planning For High Performance Web Application
Planning For High Performance Web ApplicationPlanning For High Performance Web Application
Planning For High Performance Web Application
 
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
 
Out of the Box Replication in Postgres 9.4(pgconfsf)
Out of the Box Replication in Postgres 9.4(pgconfsf)Out of the Box Replication in Postgres 9.4(pgconfsf)
Out of the Box Replication in Postgres 9.4(pgconfsf)
 
configuring a warm standby, the easy way
configuring a warm standby, the easy wayconfiguring a warm standby, the easy way
configuring a warm standby, the easy way
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)
 
Linux Common Command
Linux Common CommandLinux Common Command
Linux Common Command
 
Hadoop Summit San Jose 2013: Compression Options in Hadoop - A Tale of Tradeo...
Hadoop Summit San Jose 2013: Compression Options in Hadoop - A Tale of Tradeo...Hadoop Summit San Jose 2013: Compression Options in Hadoop - A Tale of Tradeo...
Hadoop Summit San Jose 2013: Compression Options in Hadoop - A Tale of Tradeo...
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
2009-03-13 Atlanda System z Council Meeting
2009-03-13 Atlanda System z Council Meeting2009-03-13 Atlanda System z Council Meeting
2009-03-13 Atlanda System z Council Meeting
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 

More from Robert Treat

Less Alarming Alerts!
Less Alarming Alerts!Less Alarming Alerts!
Less Alarming Alerts!
Robert Treat
 
Managing Databases In A DevOps Environment
Managing Databases In A DevOps EnvironmentManaging Databases In A DevOps Environment
Managing Databases In A DevOps Environment
Robert Treat
 
Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)
Robert Treat
 
Intro to Postgres 9 Tutorial
Intro to Postgres 9 TutorialIntro to Postgres 9 Tutorial
Intro to Postgres 9 Tutorial
Robert Treat
 

More from Robert Treat (20)

Advanced Int->Bigint Conversions
Advanced Int->Bigint ConversionsAdvanced Int->Bigint Conversions
Advanced Int->Bigint Conversions
 
Explaining Explain
Explaining ExplainExplaining Explain
Explaining Explain
 
the-lost-art-of-plpgsql
the-lost-art-of-plpgsqlthe-lost-art-of-plpgsql
the-lost-art-of-plpgsql
 
Managing Chaos In Production: Testing vs Monitoring
Managing Chaos In Production: Testing vs MonitoringManaging Chaos In Production: Testing vs Monitoring
Managing Chaos In Production: Testing vs Monitoring
 
Managing Databases In A DevOps Environment 2016
Managing Databases In A DevOps Environment 2016Managing Databases In A DevOps Environment 2016
Managing Databases In A DevOps Environment 2016
 
Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016 Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016
 
What Ops Can Learn From Design
What Ops Can Learn From DesignWhat Ops Can Learn From Design
What Ops Can Learn From Design
 
Postgres 9.4 First Look
Postgres 9.4 First LookPostgres 9.4 First Look
Postgres 9.4 First Look
 
Less Alarming Alerts!
Less Alarming Alerts!Less Alarming Alerts!
Less Alarming Alerts!
 
Past, Present, and Pachyderm - All Things Open - 2013
Past, Present, and Pachyderm - All Things Open - 2013Past, Present, and Pachyderm - All Things Open - 2013
Past, Present, and Pachyderm - All Things Open - 2013
 
Big Bad "Upgraded" Postgres
Big Bad "Upgraded" PostgresBig Bad "Upgraded" Postgres
Big Bad "Upgraded" Postgres
 
Managing Databases In A DevOps Environment
Managing Databases In A DevOps EnvironmentManaging Databases In A DevOps Environment
Managing Databases In A DevOps Environment
 
The Essential PostgreSQL.conf
The Essential PostgreSQL.confThe Essential PostgreSQL.conf
The Essential PostgreSQL.conf
 
Pro Postgres 9
Pro Postgres 9Pro Postgres 9
Pro Postgres 9
 
Advanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITRAdvanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITR
 
Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)
 
Intro to Postgres 9 Tutorial
Intro to Postgres 9 TutorialIntro to Postgres 9 Tutorial
Intro to Postgres 9 Tutorial
 
Check Please!
Check Please!Check Please!
Check Please!
 
Database Scalability Patterns
Database Scalability PatternsDatabase Scalability Patterns
Database Scalability Patterns
 
A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Pro PostgreSQL, OSCon 2008

  • 1. Pro PostgreSQL Robert Treat omniti.com brighterlamp.org
  • 2.
  • 3.
  • 4. K-0 Know Your Way Around The Project
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. S-0 Get Off To A Good Start
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. U-0 Let's Talk About Upgrades
  • 21. U-1 Let's Talk About Upgrades Versioning First Digit ( 7 .4.16 -> 8 .2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3.0 -> 8.3.1)
  • 22. U-2 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8. 2 .4 -> 8. 3 .0) Third Digit (8.3.0 -> 8.3.1)
  • 23. U-3 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3. 0 -> 8.3. 1 )
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. C-0 Figure Your Configure
  • 30.
  • 31.
  • 32.
  • 34.
  • 35.
  • 36.
  • 37. P-0 Hardware For Software People
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. A-0 Availability (Not Scalability)
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 55. H-1 Scalability what is scaling? “ How well a solution to some problem will work when the relative size of the problem increases” - Theo Schlossnagle
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65. J-0 Query Your Queries
  • 66.
  • 67.
  • 68. J-3 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column | Type | ------------------+-------------+ relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint | n_live_tup | bigint | n_dead_tup | bigint | last_vacuum | timestamptz | last_autovacuum | timestamptz | last_analyze | timestamptz | last_autoanalyze | timestamptz |
  • 69. J-4 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column | Type | ------------------+-------------+ relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint | n_live_tup | bigint | n_dead_tup | bigint | last_vacuum | timestamptz | last_autovacuum | timestamptz | last_analyze | timestamptz | last_autoanalyze | timestamptz |
  • 70. J-5 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column | Type | ------------------+-------------+ relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint | n_live_tup | bigint | n_dead_tup | bigint | last_vacuum | timestamptz | last_autovacuum | timestamptz | last_analyze | timestamptz | last_autoanalyze | timestamptz |
  • 71. J-6 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column | Type | ------------------+-------------+ relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint | n_live_tup | bigint | n_dead_tup | bigint | last_vacuum | timestamptz | last_autovacuum | timestamptz | last_analyze | timestamptz | last_autoanalyze | timestamptz |
  • 72. J-7 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column | Type | ------------------+-------------+ relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint | n_live_tup | bigint | n_dead_tup | bigint | last_vacuum | timestamptz | last_autovacuum | timestamptz | last_analyze | timestamptz | last_autoanalyze | timestamptz |
  • 73. J-8 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View "pg_catalog.pg_stat_all_tables" Column | Type | ------------------+-------------+ relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint | n_tup_hot_upd | bigint | n_live_tup | bigint | n_dead_tup | bigint | last_vacuum | timestamptz | last_autovacuum | timestamptz | last_analyze | timestamptz | last_autoanalyze | timestamptz |
  • 74. J-9 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=# pg_stat_all_indexes View "pg_catalog.pg_stat_all_indexes" Column | Type | ---------------+--------+ relid | oid | indexrelid | oid | schemaname | name | relname | name | indexrelname | name | idx_scan | bigint | idx_tup_read | bigint | idx_tup_fetch | bigint |
  • 75. J-10 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=# pg_stat_all_indexes View "pg_catalog.pg_stat_all_indexes" Column | Type | ---------------+--------+ relid | oid | indexrelid | oid | schemaname | name | relname | name | indexrelname | name | idx_scan | bigint | idx_tup_read | bigint | idx_tup_fetch | bigint |
  • 76. J-11 Query Your Queries finding slow queries: pg_statio_all_tables pagila=# pg_statio_all_tables View "pg_catalog.pg_statio_all_tables" Column | Type | -----------------+--------+ relid | oid | schemaname | name | relname | name | heap_blks_read | bigint | heap_blks_hit | bigint | idx_blks_read | bigint | idx_blks_hit | bigint | toast_blks_read | bigint | toast_blks_hit | bigint | tidx_blks_read | bigint | tidx_blks_hit | bigint |
  • 77. J-12 Query Your Queries finding slow queries: pg_statio_all_tables pagila=# pg_statio_all_tables View "pg_catalog.pg_statio_all_tables" Column | Type | -----------------+--------+ relid | oid | schemaname | name | relname | name | heap_blks_read | bigint | heap_blks_hit | bigint | idx_blks_read | bigint | idx_blks_hit | bigint | toast_blks_read | bigint | toast_blks_hit | bigint | tidx_blks_read | bigint | tidx_blks_hit | bigint |
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 89.
  • 90.
  • 92.
  • 93.
  • 94.
  • 95. I-0 Other Stuff I Should Mention
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104. I-9 Other Stuff I Should Mention ;-) my book?
  • 105.