SlideShare a Scribd company logo
1 of 18
Download to read offline
© 2014 EnterpriseDB Corporation. All rights reserved. 1
Technical Case Studies in PostgreSQL
[ Monitoring Methods ]
Rohit Vyas | 11.04.15
Quality Management Group (PostgreSQL Installer and Tools)
© 2014 EnterpriseDB Corporation. All rights reserved. 2
• Technical cases in PostgreSQL
• Database Monitoring Methods
Agenda
© 2014 EnterpriseDB Corporation. All rights reserved. 3
− Bloats
− Updates/Deletes cause bloats in a table in
PostgreSQL.
− Transaction Wraparound
− No new XID’s if 4 billion mark reached.
− Streaming/WAL Replication Lag
− Number of bytes lag from Master database may
be due to bulk load, network etc.,
− Handling WAL Archiving Files
− Piling up .ready files due to failure of archiver
process
− Catalog Corruption
− Database objects repository(pg_catalog schema)
corruption.
Technical Cases on Production Database
ERROR: database is not accepting commands to avoid
wraparound data loss in database "dvnspatial"
Hint: Stop the postmaster and use a standalone
backend to vacuum that database.
You might also need to commit or roll back old prepared
transactions.
Error executing update (updateorg.matter.security.User)
PANIC: could not write to file
“pg_xlog/xlogtemp.556” :No space left on
device
notice: pg_class row has invalid relnamespace "24580":
no matching entry in pg_namespace
row identity: oid="24581" relname="foo" relkind="r"
© 2014 EnterpriseDB Corporation. All rights reserved. 4
• Using pg_catalog Tables/Views/Functions
• Wrapping pg_catalog in Shell or any scripting
language.
• Using open source tools
− check_postgres.pl, pg_catcheck, pg_cluu, munin, Nagios etc
• Proprietary Tools
− EnterpriseDB Postgres Enterprise Manager
Database Monitoring Methods
© 2014 EnterpriseDB Corporation. All rights reserved. 5
• Tables
− pg_class
− pg_database
• Views
− pg_stat_activity
− pg_stat_all_tables
− pg_stat_archiver
− pg_stat_replication
• Functions
− pg_is_in_recovery()
− pg_last_xlog_replay_location()
− pg_last_xact_replay_timestamp()
− pg_xlog_location_diff()
Using pg_catalogs
© 2014 EnterpriseDB Corporation. All rights reserved. 6
Wrapping pg_catalogs in Shell or Other languages
Max
Connections
Long Running
queries
Idle
Connections
Waiting
Connections
© 2014 EnterpriseDB Corporation. All rights reserved. 7
• check_postgres.pl
• pg_catcheck [ catalog corruption ]
• pg_cluu
Using open source tools
© 2014 EnterpriseDB Corporation. All rights reserved. 8
Sample output of critical probes on Production
Environment
© 2014 EnterpriseDB Corporation. All rights reserved. 9
pg_catcheck
© 2014 EnterpriseDB Corporation. All rights reserved. 10
Monitoring with Proprietary Tools
• Postgres Enterprise
Manager [ EnterpriseDB] PostgreSQL
Instances of
different versions
9.0.x
9.1.x
9.4.x
9.3.x
9.2.x
PEM
Server
© 2014 EnterpriseDB Corporation. All rights reserved. 11
PEM Probes And Alerts
Table Bloat Total table bloat in server
Highest Table Bloat in server
Table Frozen XID Table FrozenXID
Database Frozen XID Database FrozenXID
Number of WAL Files Number of WAL Files
WAL Archive status Number of WAL archiving Pending
Streaming Replication Standby server lag behind the master By WAL
segment
Standby server lag behind the master by WAL
pages
Streaming Replication Lag Number of minutes lag in standby server from
master server
© 2014 EnterpriseDB Corporation. All rights reserved. 12
Dashboard's Charts
© 2014 EnterpriseDB Corporation. All rights reserved. 13
PEM Alerts
© 2014 EnterpriseDB Corporation. All rights reserved. 14
• Complete point and click
management of all database
objects
• 225+ pre-configured database
alerts for immediate global at-a-
glance monitoring complete with
SMTP notifications, SNMP traps
and richly configurable notification
rules (New)
• Remote Monitoring (New)
• A Capacity Planning and Forecast
Manager
• PostgreSQL Expert database
configuration recommendations
and deployment
• Log Management and a Log
Analysis Expert (New)
• Team Management
• Custom probes for gathering
metrics (New)
• SQL Profiler
• Index Advisor
• All optimized for working with
multiple databases consistently
across the enterprise.
Primary Product Features
© 2014 EnterpriseDB Corporation. All rights reserved. 15
• On Premise Server
• Public Cloud [AWS]
• Private Cloud [Open stack ]
Deployment
© 2014 EnterpriseDB Corporation. All rights reserved. 16
References
• http://www.enterprisedb.com/products-services-
training/products/postgres-enterprise-manager
Postgres Enterprise Manager
© 2014 EnterpriseDB Corporation. All rights reserved. 17
Questions?
© 2014 EnterpriseDB Corporation. All rights reserved. 18

More Related Content

What's hot

Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Linux Block Cache Practice on Ceph BlueStore - Junxin ZhangLinux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Linux Block Cache Practice on Ceph BlueStore - Junxin ZhangCeph Community
 
Real-time HBase: Lessons from the Cloud
Real-time HBase: Lessons from the CloudReal-time HBase: Lessons from the Cloud
Real-time HBase: Lessons from the CloudHBaseCon
 
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio Ceph Community
 
Ceph: Low Fail Go Scale
Ceph: Low Fail Go Scale Ceph: Low Fail Go Scale
Ceph: Low Fail Go Scale Ceph Community
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache RatisFloating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache RatisDataWorks Summit
 
HBaseCon 2012 | Base Metrics: What They Mean to You - Cloudera
HBaseCon 2012 | Base Metrics: What They Mean to You - ClouderaHBaseCon 2012 | Base Metrics: What They Mean to You - Cloudera
HBaseCon 2012 | Base Metrics: What They Mean to You - ClouderaCloudera, Inc.
 
Ceph Day Beijing - Ceph All-Flash Array Design Based on NUMA Architecture
Ceph Day Beijing - Ceph All-Flash Array Design Based on NUMA ArchitectureCeph Day Beijing - Ceph All-Flash Array Design Based on NUMA Architecture
Ceph Day Beijing - Ceph All-Flash Array Design Based on NUMA ArchitectureDanielle Womboldt
 
Backup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix BarbeiraBackup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix BarbeiraCeph Community
 
Tales from the Cloudera Field
Tales from the Cloudera FieldTales from the Cloudera Field
Tales from the Cloudera FieldHBaseCon
 
Accelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong Tang
Accelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong TangAccelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong Tang
Accelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong TangCeph Community
 
Ceph Performance Profiling and Reporting
Ceph Performance Profiling and ReportingCeph Performance Profiling and Reporting
Ceph Performance Profiling and ReportingCeph Community
 
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...Ceph Community
 
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server Ceph Community
 
Developing a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure EnvironmentsDeveloping a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure EnvironmentsCeph Community
 
Configuring Aerospike - Part 1
Configuring Aerospike - Part 1Configuring Aerospike - Part 1
Configuring Aerospike - Part 1Aerospike, Inc.
 
Ceph Day Shanghai - Recovery Erasure Coding and Cache Tiering
Ceph Day Shanghai - Recovery Erasure Coding and Cache TieringCeph Day Shanghai - Recovery Erasure Coding and Cache Tiering
Ceph Day Shanghai - Recovery Erasure Coding and Cache TieringCeph Community
 
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQLToro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQLInMobi Technology
 
Hadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native EraHadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native EraDataWorks Summit
 
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...Cloudera, Inc.
 
Ceph optimized Storage / Global HW solutions for SDS, David Alvarez
Ceph optimized Storage / Global HW solutions for SDS, David AlvarezCeph optimized Storage / Global HW solutions for SDS, David Alvarez
Ceph optimized Storage / Global HW solutions for SDS, David AlvarezCeph Community
 

What's hot (20)

Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Linux Block Cache Practice on Ceph BlueStore - Junxin ZhangLinux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
 
Real-time HBase: Lessons from the Cloud
Real-time HBase: Lessons from the CloudReal-time HBase: Lessons from the Cloud
Real-time HBase: Lessons from the Cloud
 
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
 
Ceph: Low Fail Go Scale
Ceph: Low Fail Go Scale Ceph: Low Fail Go Scale
Ceph: Low Fail Go Scale
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache RatisFloating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache Ratis
 
HBaseCon 2012 | Base Metrics: What They Mean to You - Cloudera
HBaseCon 2012 | Base Metrics: What They Mean to You - ClouderaHBaseCon 2012 | Base Metrics: What They Mean to You - Cloudera
HBaseCon 2012 | Base Metrics: What They Mean to You - Cloudera
 
Ceph Day Beijing - Ceph All-Flash Array Design Based on NUMA Architecture
Ceph Day Beijing - Ceph All-Flash Array Design Based on NUMA ArchitectureCeph Day Beijing - Ceph All-Flash Array Design Based on NUMA Architecture
Ceph Day Beijing - Ceph All-Flash Array Design Based on NUMA Architecture
 
Backup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix BarbeiraBackup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
 
Tales from the Cloudera Field
Tales from the Cloudera FieldTales from the Cloudera Field
Tales from the Cloudera Field
 
Accelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong Tang
Accelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong TangAccelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong Tang
Accelerating Ceph with iWARP RDMA over Ethernet - Brien Porter, Haodong Tang
 
Ceph Performance Profiling and Reporting
Ceph Performance Profiling and ReportingCeph Performance Profiling and Reporting
Ceph Performance Profiling and Reporting
 
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
 
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
 
Developing a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure EnvironmentsDeveloping a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure Environments
 
Configuring Aerospike - Part 1
Configuring Aerospike - Part 1Configuring Aerospike - Part 1
Configuring Aerospike - Part 1
 
Ceph Day Shanghai - Recovery Erasure Coding and Cache Tiering
Ceph Day Shanghai - Recovery Erasure Coding and Cache TieringCeph Day Shanghai - Recovery Erasure Coding and Cache Tiering
Ceph Day Shanghai - Recovery Erasure Coding and Cache Tiering
 
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQLToro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL
 
Hadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native EraHadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native Era
 
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...
 
Ceph optimized Storage / Global HW solutions for SDS, David Alvarez
Ceph optimized Storage / Global HW solutions for SDS, David AlvarezCeph optimized Storage / Global HW solutions for SDS, David Alvarez
Ceph optimized Storage / Global HW solutions for SDS, David Alvarez
 

Similar to Rohit_vyas_PGDay_Presentation

SQL PASS Taiwan 七月份聚會-1
SQL PASS Taiwan 七月份聚會-1SQL PASS Taiwan 七月份聚會-1
SQL PASS Taiwan 七月份聚會-1SQLPASSTW
 
Postgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuitePostgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuiteEDB
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsLetsConnect
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA EDB
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnikbiz
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdfsreedb2
 
The Central View of your Data with Postgres
The Central View of your Data with PostgresThe Central View of your Data with Postgres
The Central View of your Data with PostgresEDB
 
2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.ppt2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.pptnadirpervez2
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryEDB
 
The Power of Postgres Plus Cloud Database
The Power of Postgres Plus Cloud DatabaseThe Power of Postgres Plus Cloud Database
The Power of Postgres Plus Cloud DatabaseEDB
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016panagenda
 
Architecting with power vm
Architecting with power vmArchitecting with power vm
Architecting with power vmCharlie Cler
 
Multitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ LinkedinMultitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ LinkedinArush Jain
 
Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Perforce
 
Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Fran Navarro
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...Insight Technology, Inc.
 
EDB Database Servers and Tools
EDB Database Servers and Tools EDB Database Servers and Tools
EDB Database Servers and Tools Ashnikbiz
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentJean-François Gagné
 

Similar to Rohit_vyas_PGDay_Presentation (20)

SQL PASS Taiwan 七月份聚會-1
SQL PASS Taiwan 七月份聚會-1SQL PASS Taiwan 七月份聚會-1
SQL PASS Taiwan 七月份聚會-1
 
Postgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuitePostgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster Suite
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM Connections
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf
 
The Central View of your Data with Postgres
The Central View of your Data with PostgresThe Central View of your Data with Postgres
The Central View of your Data with Postgres
 
2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.ppt2007-05-23 Cecchet_PGCon2007.ppt
2007-05-23 Cecchet_PGCon2007.ppt
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time Recovery
 
The Power of Postgres Plus Cloud Database
The Power of Postgres Plus Cloud DatabaseThe Power of Postgres Plus Cloud Database
The Power of Postgres Plus Cloud Database
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
 
Architecting with power vm
Architecting with power vmArchitecting with power vm
Architecting with power vm
 
Multitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ LinkedinMultitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
 
Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale
 
Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster
 
Oracle Storage a ochrana dat
Oracle Storage a ochrana datOracle Storage a ochrana dat
Oracle Storage a ochrana dat
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
 
CV_avneet
CV_avneetCV_avneet
CV_avneet
 
EDB Database Servers and Tools
EDB Database Servers and Tools EDB Database Servers and Tools
EDB Database Servers and Tools
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
 

Rohit_vyas_PGDay_Presentation

  • 1. © 2014 EnterpriseDB Corporation. All rights reserved. 1 Technical Case Studies in PostgreSQL [ Monitoring Methods ] Rohit Vyas | 11.04.15 Quality Management Group (PostgreSQL Installer and Tools)
  • 2. © 2014 EnterpriseDB Corporation. All rights reserved. 2 • Technical cases in PostgreSQL • Database Monitoring Methods Agenda
  • 3. © 2014 EnterpriseDB Corporation. All rights reserved. 3 − Bloats − Updates/Deletes cause bloats in a table in PostgreSQL. − Transaction Wraparound − No new XID’s if 4 billion mark reached. − Streaming/WAL Replication Lag − Number of bytes lag from Master database may be due to bulk load, network etc., − Handling WAL Archiving Files − Piling up .ready files due to failure of archiver process − Catalog Corruption − Database objects repository(pg_catalog schema) corruption. Technical Cases on Production Database ERROR: database is not accepting commands to avoid wraparound data loss in database "dvnspatial" Hint: Stop the postmaster and use a standalone backend to vacuum that database. You might also need to commit or roll back old prepared transactions. Error executing update (updateorg.matter.security.User) PANIC: could not write to file “pg_xlog/xlogtemp.556” :No space left on device notice: pg_class row has invalid relnamespace "24580": no matching entry in pg_namespace row identity: oid="24581" relname="foo" relkind="r"
  • 4. © 2014 EnterpriseDB Corporation. All rights reserved. 4 • Using pg_catalog Tables/Views/Functions • Wrapping pg_catalog in Shell or any scripting language. • Using open source tools − check_postgres.pl, pg_catcheck, pg_cluu, munin, Nagios etc • Proprietary Tools − EnterpriseDB Postgres Enterprise Manager Database Monitoring Methods
  • 5. © 2014 EnterpriseDB Corporation. All rights reserved. 5 • Tables − pg_class − pg_database • Views − pg_stat_activity − pg_stat_all_tables − pg_stat_archiver − pg_stat_replication • Functions − pg_is_in_recovery() − pg_last_xlog_replay_location() − pg_last_xact_replay_timestamp() − pg_xlog_location_diff() Using pg_catalogs
  • 6. © 2014 EnterpriseDB Corporation. All rights reserved. 6 Wrapping pg_catalogs in Shell or Other languages Max Connections Long Running queries Idle Connections Waiting Connections
  • 7. © 2014 EnterpriseDB Corporation. All rights reserved. 7 • check_postgres.pl • pg_catcheck [ catalog corruption ] • pg_cluu Using open source tools
  • 8. © 2014 EnterpriseDB Corporation. All rights reserved. 8 Sample output of critical probes on Production Environment
  • 9. © 2014 EnterpriseDB Corporation. All rights reserved. 9 pg_catcheck
  • 10. © 2014 EnterpriseDB Corporation. All rights reserved. 10 Monitoring with Proprietary Tools • Postgres Enterprise Manager [ EnterpriseDB] PostgreSQL Instances of different versions 9.0.x 9.1.x 9.4.x 9.3.x 9.2.x PEM Server
  • 11. © 2014 EnterpriseDB Corporation. All rights reserved. 11 PEM Probes And Alerts Table Bloat Total table bloat in server Highest Table Bloat in server Table Frozen XID Table FrozenXID Database Frozen XID Database FrozenXID Number of WAL Files Number of WAL Files WAL Archive status Number of WAL archiving Pending Streaming Replication Standby server lag behind the master By WAL segment Standby server lag behind the master by WAL pages Streaming Replication Lag Number of minutes lag in standby server from master server
  • 12. © 2014 EnterpriseDB Corporation. All rights reserved. 12 Dashboard's Charts
  • 13. © 2014 EnterpriseDB Corporation. All rights reserved. 13 PEM Alerts
  • 14. © 2014 EnterpriseDB Corporation. All rights reserved. 14 • Complete point and click management of all database objects • 225+ pre-configured database alerts for immediate global at-a- glance monitoring complete with SMTP notifications, SNMP traps and richly configurable notification rules (New) • Remote Monitoring (New) • A Capacity Planning and Forecast Manager • PostgreSQL Expert database configuration recommendations and deployment • Log Management and a Log Analysis Expert (New) • Team Management • Custom probes for gathering metrics (New) • SQL Profiler • Index Advisor • All optimized for working with multiple databases consistently across the enterprise. Primary Product Features
  • 15. © 2014 EnterpriseDB Corporation. All rights reserved. 15 • On Premise Server • Public Cloud [AWS] • Private Cloud [Open stack ] Deployment
  • 16. © 2014 EnterpriseDB Corporation. All rights reserved. 16 References • http://www.enterprisedb.com/products-services- training/products/postgres-enterprise-manager Postgres Enterprise Manager
  • 17. © 2014 EnterpriseDB Corporation. All rights reserved. 17 Questions?
  • 18. © 2014 EnterpriseDB Corporation. All rights reserved. 18