SlideShare a Scribd company logo
1 of 61
Download to read offline
The Accidental DBA
                             a guide for
                          the perplexed



  Do
     n   't P
                ani
                    c
                                    Josh Berkus
                        PostgreSQL Experts, Inc.
                              LinuxCon NA 2012
“Jonathan quit.
 You're in charge of
the Postgres servers
       now.”
covered in this talk
●   PostgreSQL          ●   MySQL
    ●   installation        ●   (covered
    ●   configuration           yesterday)
    ●   connections     ●   no time for
    ●   backup              ●   replication
    ●   monitoring          ●   indexes
    ●   slow queries        ●   schema design
    ●   migrations
9.2rc1 Out Now!
“DevOps”

“Cloud”
Y U no DBA?

1.limited budgets
2.shortage of operational staff
3.cheaper OSS databases

… you are the DBA now.
Oh My God,
We’re All Going To Die.
Do
   n   't P
              a ni
                     c
Do
          n't
              P   ani
                      c
Installation
Use Packages!
●   version not important?
●   use the ones that come with your
    distro
    ●   Red Hat, Centos, SciLinux
    ●   Debian, Ubuntu
    ●   SuSE
Use Packages!
●   need the latest version?
●   alternate packages
    ●   Red Hat: yum.postgresql.org
    ●   Ubuntu: Martin Pitt's backports
    ●   SuSE: build service
    ●   Debian: backports coming soon
create data directory?
●   $PGDATA is where the database files
    live
●   most packages create it
●   if not, use “initdb” to create it
    ●   pick a suitable location!
Do
          n't
              P   ani
                      c
configuration
use good hardware
●   databases use all the hardware
    ●   RAM, CPU, IO
    ●   disk can be very important
        –   DB larger than RAM
        –   write-heavy database

●   the database cannot outperform bad
    hardware
put the database
on its own server
(or virtual server)
cloud servers
●   cloud server performance sucks
    ●   especially IO
●   make sure you have enough RAM to
    cache the whole database
Linux configuration
1.turn the OOM killer off
2.set zone_reclaim_mode = 0
3.use XFS or Ext4 for database files
4.increase shmmax, shmall
 ● so that you can raise shared_buffers
 ● this is going away with 9.3!
postgresql.conf
shared_buffers = ¼ of RAM up to 8GB
work_mem =
  ( RAM * 2 )/ max_connections
maintenance_work_mem = 1/16 RAM
effective_cache_size = 75% of RAM
checkpoint_segments =
  32 (small DB)
  to 128 (large DB, many writes)
Do
         n't
             P   ani
                     c
connections
     &
  security
network
●   local connections: UDP, if possible
    ●   faster than TCP/IP
●   other servers: port 5432
    ●   make sure it's open on the firewall!
●   on the cloud? use SSL
    ●   secure your connections
    ●   PITA to set up, though
max_connections
    “ERROR: connection limit
     exceeded for non-superusers”
●   postgresql.conf
●   increase number of connections
●   good up to about 50 + 10 x cores
●   keep needing to increase it?
    something wrong with the app
connection pooling
●   Java? use J2EE pooling
●   Everyone else: pgbouncer
    ●   event-based pooler
    ●   separate package
    ●   on DB server, or
    ●   app server, or
         rd
    ●
        3 “bouncer” server
host-based access
“FATAL: no pg_hba.conf entry for host
"192.168.0.1", user "chaos", database
"chaosLRdb", SSL off”
●   pg_hba.conf
●   access control list:
    ●   database/user/host address
    ●   like iptables for Postgres
●   change config and reload
security
“FATAL: password authentication
failed for user "wwwuser"”
●   Postgres users & passwords
    ●   CREATE/ALTER USER
    ●   “group” ROLEs
●   DB object permissions
●   Or: use LDAP or PAM
the psql
command line
Do
          n't
              P   ani
                      c
slow queries
pg_stat_activity
-[ RECORD 2 ]----+--------------------------------
datid            | 16422
datname          | libdata
procpid          | 46295
usesysid         | 10
usename          | dataentry
application_name | psql
client_addr      | 192.168.101.114
client_port      | 5432
backend_start    | 2012-08-26 15:09:05.233-07
xact_start       | 2012-08-26 15:09:06.113-07
query_start      | 2012-08-26 15:11:53.521-07
waiting          | f
current_query    | <IDLE> in transaction
locks
●   write queries can block on other write
    queries
    ●   as can table schema changes
    ●   queries can wait forever on locks
●   look for “<IDLE> in transaction”
    ●   that's a ...
Zombie Transactions




Want RAAAAAAAM
killing zombies
●   pg_cancel_backend(pid)
    ●   kills running queries with sigINT
    ●   like CTRL-C
●   pg_terminate_backend(pid)
    ●   kills bad connections, idle
        transactions
    ●   can cause DB to restart
EXPLAIN
Nested Loop (cost=792.00..828.08 rows=1422317 width=99)
  -> HashAggregate (cost=792.00..792.00 rows=1 width=4)
        -> Index Scan using
index_player_summaries_on_player_id on player_summaries
ps (cost=0.00..791.80 rows=403 width=4)
              Index Cond: (player_id = 21432312)
  -> Index Scan using index_player_summaries_on_match_id
on player_summaries (cost=0.00..33.98 rows=600 width=99)
        Index Cond: (match_id = ps.match_id)
EXPLAIN ANALYZE
Nested Loop (cost=792.00..828.08 rows=1422317
width=99) (actual time=9928.869..20753.723
rows=13470 loops=1)
  -> HashAggregate (cost=792.00..792.00 rows=1 width=4)
(actual time=9895.105..9897.096 rows=1347 loops=1)
        -> Index Scan using
index_player_summaries_on_player_id on player_summaries
ps (cost=0.00..791.80 rows=403 width=4) (actual
time=27.413..9890.887 rows=1347 loops=1)
              Index Cond: (player_id = 21432312)
  -> Index Scan using index_player_summaries_on_match_id
on player_summaries (cost=0.00..33.98 rows=600 width=99)
(actual time=7.375..8.037 rows=10 loops=1347)
        Index Cond: (match_id = ps.match_id)
Total runtime: 20764.371 ms"
explain.depesz.com
what to look for
●   “seq scan” on large table
    ●   maybe index needed
●   cartesian joins
●   really bad row estimates
    ●   ANALYZE needed?
Do
       n't
           P   ani
                   c
backups
2012-01-27 18:00:44 MSK FATAL:
   invalid page header in block
   311757 of relation
   base/26976/27977
2012-01-27 18:00:44 MSK CONTEXT:
   xlog redo insert:
   rel 1663/26976/27977;
   tid 311757/44
2012-01-27 18:00:44 MSK LOG:
   startup process (PID 392)
   exited with exit code 1
2012-01-27 18:00:44 MSK LOG:
   aborting startup due
   to startup process failure
pg_dump
●   “logical” backup
    ●   portable
    ●   compressed
    ●   works for upgrades
●   good for small databases
●   use -Fc
    ●   custom binary format
PITR
●   “Point-In-Time Recovery”
●   “binary” and “continuous” backup
    ●   take snapshot of DB files
    ●   accumulate logfile copies
●   good for large databases
●   can combine with replication
PITR - PITA
●   can be difficult to set up & monitor
●   use tools:
    ●   RepMgr
    ●   OmniPITR
    ●   WAL-E (for AWS)
Do
         n't
             P   ani
                     c
monitoring
use your favorite tool
ganglia, collectd, Hyperic, OpenNMS,
OpenView, whatever ....
● nagios check_postgres.pl

  ●   broad list of checks
  ●   mine it for queries and techniques
many useful checks
●   disk space        ●   long queries
●   caching RAM       ●   database size
●   response time     ●   table bloat
●   connections       ●   system load
●   idle transacts    ●   replication lag
●   table growth      ●   XID wraparound
●   waiting queries   ●   execution time
activity log
●   connections & disconnections
●   slow queries
●   DB swap usage
●   schema changes
●   lock waits & deadlocks
pgfouine, pgbadger
Do
            n't
                P   ani
                        c
schema migrations
SQL-DDL is code
1.write migration scripts
  ● make them idempotent
  ● write “undo” scripts
2.check them into version control
3.test them on a staging server
  ● check how long they take
4.deploy on production
Postgres doesn't
require downtime for
   most schema
      changes.
Do
        n't
            P   ani
 updates            c

    &
upgrades
major vs. minor
9.2 == a major version
  ●   requires an upgrade from 9.1.4
  ●   contains features not in 9.1
  ●   requires testing and planned downtime
9.1.5 == a minor version
  ●   is a minor “update” from 9.1.4.
  ●   can (and should) be applied immediately
minor updates
●   come out ~ every 2 months
●   contain only bugfixes
    ●   security hole patches
    ●   data loss prevention
    ●   fix server crashes
●   no new or changed features
    ●   occasional documented breakage
update procedure
1.schedule 5 minute downtime
2.download packages
3.shut down postgresql
4.install packages
5.restart postgresql
6.restart application
major upgrades
●   come out once per year
●   have many new features
    ●   and sometimes break stuff which used to
        work
●   require extensive testing with your
    application
●   require significant downtime to
    upgrade
upgrade procedures
●   dump & reload
    ●   use pg_dump & pg_restore on database
    ●   most reliable way
    ●   “cleans up” database in process
    ●   best with small databases
    ●   can take a long, long time
upgrade procedures
●   pgUpgrade
    ●   upgrade “in place”
    ●   much faster
    ●   does not “clean up” database
    ●   sometimes doesn't work
EOL after
 5 years
Getting Help
●   docs
    ●   postgresql.org/docs/
    ●   postgresguide.org
    ●   wiki.postgresql.org
●   books
    ●   PostgreSQL Up and Running (O'Reilly)
    ●   PostgreSQL 9.0 High Performance (Packt)
Getting Help
●   mailing lists
    ●   postgresql.org/community/lists
        –   pgsql-novice, pgsql-general
●   chat
    ●   irc.freenode.net, #postgresql
●   web
    ●   dba.stackexchange.com
    ●   planet.postgresql.org
questions?
●   Josh Berkus
    ●   josh@pgexperts.com
    ●   PGX: www.pgexperts.com
    ●   Blog: www.databasesoup.com
●   Upcoming Events
    ●   Postgres Open: Chicago, Sept 17-19
    ●   LISA: San Diego, Dec 5-8
        Copyright 2012 PostgreSQL Experts Inc. Released under the Creative Commons
        Attribution License. All images are the property of their respective owners. The
        Don't Panic slogan and logo is property of the BBC, and the Dilbert image belongs
        to Scott Adams and is used here as parody.

More Related Content

What's hot

Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
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
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogicalUmair Shahid
 
Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Denish Patel
 
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 WorldJignesh Shah
 
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
 
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 DataJignesh Shah
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyAlexander Kukushkin
 
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...Command Prompt., Inc
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationMydbops
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseFITC
 
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...ScaleGrid.io
 
Introduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsIntroduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsJignesh Shah
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper lookJignesh Shah
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALEPostgreSQL Experts, Inc.
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
MySQL HA with Pacemaker
MySQL HA with  PacemakerMySQL HA with  Pacemaker
MySQL HA with PacemakerKris Buytaert
 
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)Denish Patel
 

What's hot (19)

Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
7 Ways To Crash Postgres
7 Ways To Crash Postgres7 Ways To Crash Postgres
7 Ways To Crash Postgres
 
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)
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 
Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2
 
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
 
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)
 
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
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
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...
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL Database
 
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
 
Introduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsIntroduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System Administrators
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper look
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
MySQL HA with Pacemaker
MySQL HA with  PacemakerMySQL HA with  Pacemaker
MySQL HA with Pacemaker
 
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)
 

Similar to The Accidental DBA: A Guide for the Perplexed

Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsProper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsDave Stokes
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...Dave Stokes
 
Eko10 Workshop Opensource Database Auditing
Eko10  Workshop Opensource Database AuditingEko10  Workshop Opensource Database Auditing
Eko10 Workshop Opensource Database AuditingJuan Berner
 
Elephants in the Cloud
Elephants in the CloudElephants in the Cloud
Elephants in the CloudMike Fowler
 
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORINGEko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORINGPablo Garbossa
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadKrivoy Rog IT Community
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Valerii Kravchuk
 
An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with PostgresqlJoshua Drake
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbWei Shan Ang
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkHarold Giménez
 
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux AdminsLinuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux AdminsDave Stokes
 
Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesJonathan Katz
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015Dave Stokes
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQLlefredbe
 
Journey through high performance django application
Journey through high performance django applicationJourney through high performance django application
Journey through high performance django applicationbangaloredjangousergroup
 
Pg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyPg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyFederico Campoli
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL ExtensionsEDB
 

Similar to The Accidental DBA: A Guide for the Perplexed (20)

Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsProper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
 
Eko10 Workshop Opensource Database Auditing
Eko10  Workshop Opensource Database AuditingEko10  Workshop Opensource Database Auditing
Eko10 Workshop Opensource Database Auditing
 
Elephants in the Cloud
Elephants in the CloudElephants in the Cloud
Elephants in the Cloud
 
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORINGEko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)
 
An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the Trunk
 
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux AdminsLinuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
 
Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with Kubernetes
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
 
Journey through high performance django application
Journey through high performance django applicationJourney through high performance django application
Journey through high performance django application
 
Pg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyPg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easy
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL Extensions
 

More from PostgreSQL Experts, Inc.

Elephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsElephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsPostgreSQL Experts, Inc.
 

More from PostgreSQL Experts, Inc. (20)

Fail over fail_back
Fail over fail_backFail over fail_back
Fail over fail_back
 
HowTo DR
HowTo DRHowTo DR
HowTo DR
 
Give A Great Tech Talk 2013
Give A Great Tech Talk 2013Give A Great Tech Talk 2013
Give A Great Tech Talk 2013
 
Pg py-and-squid-pypgday
Pg py-and-squid-pypgdayPg py-and-squid-pypgday
Pg py-and-squid-pypgday
 
92 grand prix_2013
92 grand prix_201392 grand prix_2013
92 grand prix_2013
 
Five steps perform_2013
Five steps perform_2013Five steps perform_2013
Five steps perform_2013
 
PWNage: Producing a newsletter with Perl
PWNage: Producing a newsletter with PerlPWNage: Producing a newsletter with Perl
PWNage: Producing a newsletter with Perl
 
10 Ways to Destroy Your Community
10 Ways to Destroy Your Community10 Ways to Destroy Your Community
10 Ways to Destroy Your Community
 
Open Source Press Relations
Open Source Press RelationsOpen Source Press Relations
Open Source Press Relations
 
5 (more) Ways To Destroy Your Community
5 (more) Ways To Destroy Your Community5 (more) Ways To Destroy Your Community
5 (more) Ways To Destroy Your Community
 
Preventing Community (from Linux Collab)
Preventing Community (from Linux Collab)Preventing Community (from Linux Collab)
Preventing Community (from Linux Collab)
 
Development of 8.3 In India
Development of 8.3 In IndiaDevelopment of 8.3 In India
Development of 8.3 In India
 
PostgreSQL and MySQL
PostgreSQL and MySQLPostgreSQL and MySQL
PostgreSQL and MySQL
 
50 Ways To Love Your Project
50 Ways To Love Your Project50 Ways To Love Your Project
50 Ways To Love Your Project
 
8.4 Upcoming Features
8.4 Upcoming Features 8.4 Upcoming Features
8.4 Upcoming Features
 
Elephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and VariantsElephant Roads: PostgreSQL Patches and Variants
Elephant Roads: PostgreSQL Patches and Variants
 
Writeable CTEs: The Next Big Thing
Writeable CTEs: The Next Big ThingWriteable CTEs: The Next Big Thing
Writeable CTEs: The Next Big Thing
 
PostgreSQL Development Today: 9.0
PostgreSQL Development Today: 9.0PostgreSQL Development Today: 9.0
PostgreSQL Development Today: 9.0
 
9.1 Mystery Tour
9.1 Mystery Tour9.1 Mystery Tour
9.1 Mystery Tour
 
Postgres Open Keynote: The Next 25 Years
Postgres Open Keynote: The Next 25 YearsPostgres Open Keynote: The Next 25 Years
Postgres Open Keynote: The Next 25 Years
 

Recently uploaded

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Recently uploaded (20)

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

The Accidental DBA: A Guide for the Perplexed

  • 1. The Accidental DBA a guide for the perplexed Do n 't P ani c Josh Berkus PostgreSQL Experts, Inc. LinuxCon NA 2012
  • 2. “Jonathan quit. You're in charge of the Postgres servers now.”
  • 3. covered in this talk ● PostgreSQL ● MySQL ● installation ● (covered ● configuration yesterday) ● connections ● no time for ● backup ● replication ● monitoring ● indexes ● slow queries ● schema design ● migrations
  • 6. Y U no DBA? 1.limited budgets 2.shortage of operational staff 3.cheaper OSS databases … you are the DBA now.
  • 7. Oh My God, We’re All Going To Die.
  • 8. Do n 't P a ni c
  • 9.
  • 10.
  • 11. Do n't P ani c Installation
  • 12. Use Packages! ● version not important? ● use the ones that come with your distro ● Red Hat, Centos, SciLinux ● Debian, Ubuntu ● SuSE
  • 13. Use Packages! ● need the latest version? ● alternate packages ● Red Hat: yum.postgresql.org ● Ubuntu: Martin Pitt's backports ● SuSE: build service ● Debian: backports coming soon
  • 14. create data directory? ● $PGDATA is where the database files live ● most packages create it ● if not, use “initdb” to create it ● pick a suitable location!
  • 15. Do n't P ani c configuration
  • 16. use good hardware ● databases use all the hardware ● RAM, CPU, IO ● disk can be very important – DB larger than RAM – write-heavy database ● the database cannot outperform bad hardware
  • 17. put the database on its own server (or virtual server)
  • 18. cloud servers ● cloud server performance sucks ● especially IO ● make sure you have enough RAM to cache the whole database
  • 19. Linux configuration 1.turn the OOM killer off 2.set zone_reclaim_mode = 0 3.use XFS or Ext4 for database files 4.increase shmmax, shmall ● so that you can raise shared_buffers ● this is going away with 9.3!
  • 20. postgresql.conf shared_buffers = ¼ of RAM up to 8GB work_mem = ( RAM * 2 )/ max_connections maintenance_work_mem = 1/16 RAM effective_cache_size = 75% of RAM checkpoint_segments = 32 (small DB) to 128 (large DB, many writes)
  • 21. Do n't P ani c connections & security
  • 22. network ● local connections: UDP, if possible ● faster than TCP/IP ● other servers: port 5432 ● make sure it's open on the firewall! ● on the cloud? use SSL ● secure your connections ● PITA to set up, though
  • 23. max_connections “ERROR: connection limit exceeded for non-superusers” ● postgresql.conf ● increase number of connections ● good up to about 50 + 10 x cores ● keep needing to increase it? something wrong with the app
  • 24. connection pooling ● Java? use J2EE pooling ● Everyone else: pgbouncer ● event-based pooler ● separate package ● on DB server, or ● app server, or rd ● 3 “bouncer” server
  • 25. host-based access “FATAL: no pg_hba.conf entry for host "192.168.0.1", user "chaos", database "chaosLRdb", SSL off” ● pg_hba.conf ● access control list: ● database/user/host address ● like iptables for Postgres ● change config and reload
  • 26. security “FATAL: password authentication failed for user "wwwuser"” ● Postgres users & passwords ● CREATE/ALTER USER ● “group” ROLEs ● DB object permissions ● Or: use LDAP or PAM
  • 28. Do n't P ani c slow queries
  • 29. pg_stat_activity -[ RECORD 2 ]----+-------------------------------- datid | 16422 datname | libdata procpid | 46295 usesysid | 10 usename | dataentry application_name | psql client_addr | 192.168.101.114 client_port | 5432 backend_start | 2012-08-26 15:09:05.233-07 xact_start | 2012-08-26 15:09:06.113-07 query_start | 2012-08-26 15:11:53.521-07 waiting | f current_query | <IDLE> in transaction
  • 30. locks ● write queries can block on other write queries ● as can table schema changes ● queries can wait forever on locks ● look for “<IDLE> in transaction” ● that's a ...
  • 32. killing zombies ● pg_cancel_backend(pid) ● kills running queries with sigINT ● like CTRL-C ● pg_terminate_backend(pid) ● kills bad connections, idle transactions ● can cause DB to restart
  • 33. EXPLAIN Nested Loop (cost=792.00..828.08 rows=1422317 width=99) -> HashAggregate (cost=792.00..792.00 rows=1 width=4) -> Index Scan using index_player_summaries_on_player_id on player_summaries ps (cost=0.00..791.80 rows=403 width=4) Index Cond: (player_id = 21432312) -> Index Scan using index_player_summaries_on_match_id on player_summaries (cost=0.00..33.98 rows=600 width=99) Index Cond: (match_id = ps.match_id)
  • 34. EXPLAIN ANALYZE Nested Loop (cost=792.00..828.08 rows=1422317 width=99) (actual time=9928.869..20753.723 rows=13470 loops=1) -> HashAggregate (cost=792.00..792.00 rows=1 width=4) (actual time=9895.105..9897.096 rows=1347 loops=1) -> Index Scan using index_player_summaries_on_player_id on player_summaries ps (cost=0.00..791.80 rows=403 width=4) (actual time=27.413..9890.887 rows=1347 loops=1) Index Cond: (player_id = 21432312) -> Index Scan using index_player_summaries_on_match_id on player_summaries (cost=0.00..33.98 rows=600 width=99) (actual time=7.375..8.037 rows=10 loops=1347) Index Cond: (match_id = ps.match_id) Total runtime: 20764.371 ms"
  • 36. what to look for ● “seq scan” on large table ● maybe index needed ● cartesian joins ● really bad row estimates ● ANALYZE needed?
  • 37. Do n't P ani c backups
  • 38. 2012-01-27 18:00:44 MSK FATAL: invalid page header in block 311757 of relation base/26976/27977 2012-01-27 18:00:44 MSK CONTEXT: xlog redo insert: rel 1663/26976/27977; tid 311757/44 2012-01-27 18:00:44 MSK LOG: startup process (PID 392) exited with exit code 1 2012-01-27 18:00:44 MSK LOG: aborting startup due to startup process failure
  • 39.
  • 40. pg_dump ● “logical” backup ● portable ● compressed ● works for upgrades ● good for small databases ● use -Fc ● custom binary format
  • 41. PITR ● “Point-In-Time Recovery” ● “binary” and “continuous” backup ● take snapshot of DB files ● accumulate logfile copies ● good for large databases ● can combine with replication
  • 42. PITR - PITA ● can be difficult to set up & monitor ● use tools: ● RepMgr ● OmniPITR ● WAL-E (for AWS)
  • 43. Do n't P ani c monitoring
  • 44. use your favorite tool ganglia, collectd, Hyperic, OpenNMS, OpenView, whatever .... ● nagios check_postgres.pl ● broad list of checks ● mine it for queries and techniques
  • 45. many useful checks ● disk space ● long queries ● caching RAM ● database size ● response time ● table bloat ● connections ● system load ● idle transacts ● replication lag ● table growth ● XID wraparound ● waiting queries ● execution time
  • 46. activity log ● connections & disconnections ● slow queries ● DB swap usage ● schema changes ● lock waits & deadlocks
  • 48. Do n't P ani c schema migrations
  • 49. SQL-DDL is code 1.write migration scripts ● make them idempotent ● write “undo” scripts 2.check them into version control 3.test them on a staging server ● check how long they take 4.deploy on production
  • 50. Postgres doesn't require downtime for most schema changes.
  • 51. Do n't P ani updates c & upgrades
  • 52. major vs. minor 9.2 == a major version ● requires an upgrade from 9.1.4 ● contains features not in 9.1 ● requires testing and planned downtime 9.1.5 == a minor version ● is a minor “update” from 9.1.4. ● can (and should) be applied immediately
  • 53. minor updates ● come out ~ every 2 months ● contain only bugfixes ● security hole patches ● data loss prevention ● fix server crashes ● no new or changed features ● occasional documented breakage
  • 54. update procedure 1.schedule 5 minute downtime 2.download packages 3.shut down postgresql 4.install packages 5.restart postgresql 6.restart application
  • 55. major upgrades ● come out once per year ● have many new features ● and sometimes break stuff which used to work ● require extensive testing with your application ● require significant downtime to upgrade
  • 56. upgrade procedures ● dump & reload ● use pg_dump & pg_restore on database ● most reliable way ● “cleans up” database in process ● best with small databases ● can take a long, long time
  • 57. upgrade procedures ● pgUpgrade ● upgrade “in place” ● much faster ● does not “clean up” database ● sometimes doesn't work
  • 58. EOL after 5 years
  • 59. Getting Help ● docs ● postgresql.org/docs/ ● postgresguide.org ● wiki.postgresql.org ● books ● PostgreSQL Up and Running (O'Reilly) ● PostgreSQL 9.0 High Performance (Packt)
  • 60. Getting Help ● mailing lists ● postgresql.org/community/lists – pgsql-novice, pgsql-general ● chat ● irc.freenode.net, #postgresql ● web ● dba.stackexchange.com ● planet.postgresql.org
  • 61. questions? ● Josh Berkus ● josh@pgexperts.com ● PGX: www.pgexperts.com ● Blog: www.databasesoup.com ● Upcoming Events ● Postgres Open: Chicago, Sept 17-19 ● LISA: San Diego, Dec 5-8 Copyright 2012 PostgreSQL Experts Inc. Released under the Creative Commons Attribution License. All images are the property of their respective owners. The Don't Panic slogan and logo is property of the BBC, and the Dilbert image belongs to Scott Adams and is used here as parody.