SlideShare a Scribd company logo
© 2016 EDB. All rights reserved. 1
5 Postgres DBA Tips
• Dave Page | 2016-10-20
© 2016 EDB. All rights reserved. 2
• EnterpriseDB:
− Vice President & Chief Architect, Tools & Installers
− EDB Postgres Enterprise Manager
− EDB Failover Manager
− Cloud Products (EDB Ark, OpenShift containers)
− Packaging and distribution (installers, RPMs, StackBuilder etc)
− Configuration Management
• PostgreSQL:
− Core Team Member
− pgAdmin Project Lead
− Secretary of the board, PostgreSQL Europe
− Chairman of the board, PostgreSQL Community Association of Canada
− Webmaster and Sysadmin teams
Introduction – Dave Page
© 2016 EDB. All rights reserved. 3
• The leading Open Source management and administration application for
Postgres:

• Browse the database structure
• Create, edit and drop Postgres objects such as databases, tables and functions
• View current system activity in real time
• View and edit table data
• Execute arbitrary SQL queries and view the results
pgAdmin
© 2016 EDB. All rights reserved. 4
• Includes all features of pgAdmin, and adds:

• A powerful SQL profiler for examining server workload
• 24x7 monitoring and alerting
• Dashboards for visualising monitoring data
• Ad-hoc reporting with trend analysis for capacity management
• Tools for en-masse management:
• Configuration
• Software and upgrade deployment
• Static analysis
• Log analysis
Postgres Enterprise Manager (PEM)
© 2016 EDB. All rights reserved. 5
• pgAdmin 4 released with PostgreSQL 9.6
• PEM 7 will include an updated UI based on pgAdmin 4, and is due for
release in Q1 2017

• This presentation is based on pgAdmin III and PEM 6 for ease of
comparison
• All features shown will also be available in pgAdmin 4 and PEM 7
Roadmap
© 2016 EDB. All rights reserved. 6
• Standard functionality for ad-hoc use in pgAdmin
• Integrated into the SQL Profiler in PEM
• Allows quick and easy visualisation of plans when developing SQL:
• Renders each node in the plan as an icon depicting the type of operation (e.g.
sequential scan, hash join, aggregate etc)
• Popup panels show node info (e.g. objects, filter data, row estimates and
estimated costs)
• Variable-thickness arrows show the flow of data from one node into the next,
giving visual cues to the volume of data
Visual Query Plans
© 2016 EDB. All rights reserved. 7
Demo #1
Visual Query Plans
© 2016 EDB. All rights reserved. 8
• Included with the PEM fat client
• Can optionally be used with a PEM server in order to schedule profiling of
workloads, for example, to examine the execution of a nightly batch job
• Requires a plugin on the database server:
• Lightweight
• No locking
• Profiles only the required combination of databases and/or users
• Safety features prevent storage space exhaustion when profiling busy
systems
SQL Profiler (1)
© 2016 EDB. All rights reserved. 9
• Records 20+ statistics as well as the query plan and query text for all
appropriate queries executed during the profiling run
• Browse the captured data, with powerful filtering capabilities to help
discover expensive queries
• View the query text executed, and text and graphical plans
• View aggregate statistics, e.g:
• This query executed 27 times during the run
• This query was responsible for 58% of cache misses during the run
• Integrates with the Index Advisor when used with EDB Postgres Advanced
Server
SQL Profiler (2)
© 2016 EDB. All rights reserved. 10
Demo #2
SQL Profiler
© 2016 EDB. All rights reserved. 11
• Probes execute on schedules, collecting one or more metrics about the
system
• Each probe operates at a specific level of the logical object hierarchy:
• Host/OS
• Database Server
• Database
• Schema
• Each individual instance of a probe may be tuned:
• Enabled/disabled
• Execution frequency
• Data retention
24x7 Monitoring (1)
© 2016 EDB. All rights reserved. 12
• Probes may be:
• Internal (implemented as part of the PEM Agent in C++)
• SQL
• WMI
• Batch/shell
• Custom probes may be implemented in SQL, WMI or Batch/shell to
monitor domain-specific metrics
• Individual metrics may be cumulative or point-in-time values
• Individual metrics may be graph-able numerics, or other datatypes such
as strings
24x7 Monitoring (2)
© 2016 EDB. All rights reserved. 13
Demo #3
Probe Configuration
& Dashboards
© 2016 EDB. All rights reserved. 14
• Metric data may be used in the Capacity Manager for visualisation
• Save/load report templates
• Re-use graph definitions in custom dashboards
• Plot multiple metrics from anywhere in the logical object hierarchy
• Data aggregation method selected on a per-metric basis
• Specify timeframe based on:
• Start -> End date/time (past, present or future)
• Start date -> Point at which a metric exceeds or falls below a value
• Data that exceeds the recorded available data will be extrapolated using a
linear trend analysis algorithm to allow predictive reporting
Capacity Management
© 2016 EDB. All rights reserved. 15
Demo #4
Capacity Manager
© 2016 EDB. All rights reserved. 16
• An alerting engine constantly monitors collected metrics for values that fall
outside acceptable minimum or maximum levels
• Templates are used to define alerts on each object type, tailored to the
needs of each instance of the object
• Threshold values may be specified for low, medium and high level alerts,
along with an operator to denote whether low or high values are to be
detected
• Some templates allow additional parameters to be defined, for example,
“Number of ERRORs in the Postgres Log in the last N minutes
• Users can create custom alert templates from any data collected for which
a scalar numeric value can be calculated
Alerting (1)
© 2016 EDB. All rights reserved. 17
• Alerts can be sent to users:
• Visually, through the PEM dashboards
• Via SNMP Traps to an upstream monitoring system (a database function is
included to generate a MIB file)
• Via SMTP to email recipients, grouped as needed to cover different alert levels
or hours of the day
• Via Nagios passive service checks to a Nagios installation (database functions
are included to generate host and service definitions)
• Scripts may be executed in response to alert level changes:
• Either on the affected host, for example, to restart a service
• or on the PEM server, for example, to call the RESTful API of an SMS service
provider or chat bot in a sysadmin channel/chatroom
Alerting (2)
© 2016 EDB. All rights reserved. 18
Demo #5
Alerting
© 2016 EDB. All rights reserved. 19
Questions?
© 2016 EDB. All rights reserved. 20

More Related Content

PPTX
5 Ways to Make Your Postgres GDPR-Ready
 
PDF
EDB Postgres DBA Best Practices
 
PDF
5 Tips to Simplify the Management of Your Postgres Database
 
PDF
DBaaS with EDB Postgres on AWS
 
PDF
EnterpriseDB BackUp and Recovery Tool
 
PDF
Postgres Integrates Effectively in the "Enterprise Sandbox"
 
PDF
Best Practices & Lessons Learned from Deployment of PostgreSQL
 
PDF
Making Postgres Central in Your Data Center
 
5 Ways to Make Your Postgres GDPR-Ready
 
EDB Postgres DBA Best Practices
 
5 Tips to Simplify the Management of Your Postgres Database
 
DBaaS with EDB Postgres on AWS
 
EnterpriseDB BackUp and Recovery Tool
 
Postgres Integrates Effectively in the "Enterprise Sandbox"
 
Best Practices & Lessons Learned from Deployment of PostgreSQL
 
Making Postgres Central in Your Data Center
 

What's hot (20)

PDF
Which Postgres is Right for You? - Part 2
 
PDF
EnterpriseDB's Best Practices for Postgres DBAs
 
PDF
Hello World with EDB Postgres
 
PDF
Expanding with EDB Postgres Advanced Server 9.5
 
PDF
Best Practices for a Complete Postgres Enterprise Architecture Setup
 
PDF
5 Advantages of EDB's RemoteDBA Services
 
PDF
Active/Active Database Solutions with Log Based Replication in xDB 6.0
 
PDF
Which Postgres is Right for You?
 
PDF
Reducing the Risks of Migrating Off Oracle
 
PDF
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
 
PDF
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
PPTX
How to Monitor Postgres Like a Pro!
 
PDF
Postgres Point-in-Time Recovery
 
PPTX
How to Design for Database High Availability
 
PPTX
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
PPTX
Oracle to Postgres Schema Migration Hustle
 
PPTX
Migration DB2 to EDB - Project Experience
 
PPTX
The Need For Speed - Strategies to Modernize Your Data Center
 
PDF
Making the Most of Your Postgres Rollout
 
PDF
SQL Server 2017 Enhancements You Need To Know
Which Postgres is Right for You? - Part 2
 
EnterpriseDB's Best Practices for Postgres DBAs
 
Hello World with EDB Postgres
 
Expanding with EDB Postgres Advanced Server 9.5
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
 
5 Advantages of EDB's RemoteDBA Services
 
Active/Active Database Solutions with Log Based Replication in xDB 6.0
 
Which Postgres is Right for You?
 
Reducing the Risks of Migrating Off Oracle
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
How to Monitor Postgres Like a Pro!
 
Postgres Point-in-Time Recovery
 
How to Design for Database High Availability
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Oracle to Postgres Schema Migration Hustle
 
Migration DB2 to EDB - Project Experience
 
The Need For Speed - Strategies to Modernize Your Data Center
 
Making the Most of Your Postgres Rollout
 
SQL Server 2017 Enhancements You Need To Know
Ad

Viewers also liked (6)

PDF
Bn 1016 demo postgre sql-online-training
PDF
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
PDF
Why PostgreSQL for Analytics Infrastructure (DW)?
PDF
PostgreSQL 9.6 Performance-Scalability Improvements
PDF
What's New in PostgreSQL 9.6
 
PPTX
One Coin One Brick project
Bn 1016 demo postgre sql-online-training
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Why PostgreSQL for Analytics Infrastructure (DW)?
PostgreSQL 9.6 Performance-Scalability Improvements
What's New in PostgreSQL 9.6
 
One Coin One Brick project
Ad

Similar to 5 Postgres DBA Tips (20)

PDF
Introducing Postgres Enterprise Manager 5.0
 
PPTX
Webinar: Managing Postgres at Scale
 
PDF
New enhancements for security and usability in EDB 13
 
PDF
Best Practices for Monitoring Postgres
 
PPTX
New enhancements for security and usability in EDB 13
 
PDF
Best Practices for Becoming an Exceptional Postgres DBA
 
PDF
Intro.to.pem webinar.slides-061913
 
PDF
Postgres Enterprise Manager 4.0 Overview
 
PDF
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
 
PPTX
Les nouveautés d'EDB Postgres 11
 
PPTX
Neuerungen in EDB Postgres 11
 
PPTX
EDB Postgres Platform 11 Webinar
 
PDF
Managing Postgres at Scale With Postgres Enterprise Manager
 
PPTX
EDB Database Servers and Tools
PDF
Optimizing Your Postgres ROI Through Best Practices
 
PPTX
Enterprise-class security with PostgreSQL - 2
PDF
Remote DBA Service: Powering your DBA needs
 
PDF
Business Continuity Considerations for a More Reliable Postgres Environment
 
PDF
What's New in Postgres Plus Advanced Server 9.3
 
PPTX
Oracle database performance monitoring diagnosis and reporting with EG Innova...
Introducing Postgres Enterprise Manager 5.0
 
Webinar: Managing Postgres at Scale
 
New enhancements for security and usability in EDB 13
 
Best Practices for Monitoring Postgres
 
New enhancements for security and usability in EDB 13
 
Best Practices for Becoming an Exceptional Postgres DBA
 
Intro.to.pem webinar.slides-061913
 
Postgres Enterprise Manager 4.0 Overview
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
 
Les nouveautés d'EDB Postgres 11
 
Neuerungen in EDB Postgres 11
 
EDB Postgres Platform 11 Webinar
 
Managing Postgres at Scale With Postgres Enterprise Manager
 
EDB Database Servers and Tools
Optimizing Your Postgres ROI Through Best Practices
 
Enterprise-class security with PostgreSQL - 2
Remote DBA Service: Powering your DBA needs
 
Business Continuity Considerations for a More Reliable Postgres Environment
 
What's New in Postgres Plus Advanced Server 9.3
 
Oracle database performance monitoring diagnosis and reporting with EG Innova...

More from EDB (20)

PDF
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
PDF
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
PDF
Migre sus bases de datos Oracle a la nube
 
PDF
EFM Office Hours - APJ - July 29, 2021
 
PDF
Benchmarking Cloud Native PostgreSQL
 
PDF
Las Variaciones de la Replicación de PostgreSQL
 
PDF
NoSQL and Spatial Database Capabilities using PostgreSQL
 
PDF
Is There Anything PgBouncer Can’t Do?
 
PDF
Data Analysis with TensorFlow in PostgreSQL
 
PDF
Practical Partitioning in Production with Postgres
 
PDF
A Deeper Dive into EXPLAIN
 
PDF
IOT with PostgreSQL
 
PDF
A Journey from Oracle to PostgreSQL
 
PDF
Psql is awesome!
 
PDF
EDB 13 - New Enhancements for Security and Usability - APJ
 
PPTX
Comment sauvegarder correctement vos données
 
PDF
Cloud Native PostgreSQL - Italiano
 
PPTX
Best Practices in Security with PostgreSQL
 
PDF
Cloud Native PostgreSQL - APJ
 
PDF
Best Practices in Security with PostgreSQL
 
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
Migre sus bases de datos Oracle a la nube
 
EFM Office Hours - APJ - July 29, 2021
 
Benchmarking Cloud Native PostgreSQL
 
Las Variaciones de la Replicación de PostgreSQL
 
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Is There Anything PgBouncer Can’t Do?
 
Data Analysis with TensorFlow in PostgreSQL
 
Practical Partitioning in Production with Postgres
 
A Deeper Dive into EXPLAIN
 
IOT with PostgreSQL
 
A Journey from Oracle to PostgreSQL
 
Psql is awesome!
 
EDB 13 - New Enhancements for Security and Usability - APJ
 
Comment sauvegarder correctement vos données
 
Cloud Native PostgreSQL - Italiano
 
Best Practices in Security with PostgreSQL
 
Cloud Native PostgreSQL - APJ
 
Best Practices in Security with PostgreSQL
 

Recently uploaded (20)

PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
PDF
How to Confidently Manage Project Budgets
PDF
Digital Strategies for Manufacturing Companies
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
AI in Product Development-omnex systems
PDF
System and Network Administraation Chapter 3
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
PPTX
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
L1 - Introduction to python Backend.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
How to Confidently Manage Project Budgets
Digital Strategies for Manufacturing Companies
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
PTS Company Brochure 2025 (1).pdf.......
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
AI in Product Development-omnex systems
System and Network Administraation Chapter 3
How to Migrate SBCGlobal Email to Yahoo Easily
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
ManageIQ - Sprint 268 Review - Slide Deck
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
L1 - Introduction to python Backend.pptx

5 Postgres DBA Tips

  • 1. © 2016 EDB. All rights reserved. 1 5 Postgres DBA Tips • Dave Page | 2016-10-20
  • 2. © 2016 EDB. All rights reserved. 2 • EnterpriseDB: − Vice President & Chief Architect, Tools & Installers − EDB Postgres Enterprise Manager − EDB Failover Manager − Cloud Products (EDB Ark, OpenShift containers) − Packaging and distribution (installers, RPMs, StackBuilder etc) − Configuration Management • PostgreSQL: − Core Team Member − pgAdmin Project Lead − Secretary of the board, PostgreSQL Europe − Chairman of the board, PostgreSQL Community Association of Canada − Webmaster and Sysadmin teams Introduction – Dave Page
  • 3. © 2016 EDB. All rights reserved. 3 • The leading Open Source management and administration application for Postgres:
 • Browse the database structure • Create, edit and drop Postgres objects such as databases, tables and functions • View current system activity in real time • View and edit table data • Execute arbitrary SQL queries and view the results pgAdmin
  • 4. © 2016 EDB. All rights reserved. 4 • Includes all features of pgAdmin, and adds:
 • A powerful SQL profiler for examining server workload • 24x7 monitoring and alerting • Dashboards for visualising monitoring data • Ad-hoc reporting with trend analysis for capacity management • Tools for en-masse management: • Configuration • Software and upgrade deployment • Static analysis • Log analysis Postgres Enterprise Manager (PEM)
  • 5. © 2016 EDB. All rights reserved. 5 • pgAdmin 4 released with PostgreSQL 9.6 • PEM 7 will include an updated UI based on pgAdmin 4, and is due for release in Q1 2017
 • This presentation is based on pgAdmin III and PEM 6 for ease of comparison • All features shown will also be available in pgAdmin 4 and PEM 7 Roadmap
  • 6. © 2016 EDB. All rights reserved. 6 • Standard functionality for ad-hoc use in pgAdmin • Integrated into the SQL Profiler in PEM • Allows quick and easy visualisation of plans when developing SQL: • Renders each node in the plan as an icon depicting the type of operation (e.g. sequential scan, hash join, aggregate etc) • Popup panels show node info (e.g. objects, filter data, row estimates and estimated costs) • Variable-thickness arrows show the flow of data from one node into the next, giving visual cues to the volume of data Visual Query Plans
  • 7. © 2016 EDB. All rights reserved. 7 Demo #1 Visual Query Plans
  • 8. © 2016 EDB. All rights reserved. 8 • Included with the PEM fat client • Can optionally be used with a PEM server in order to schedule profiling of workloads, for example, to examine the execution of a nightly batch job • Requires a plugin on the database server: • Lightweight • No locking • Profiles only the required combination of databases and/or users • Safety features prevent storage space exhaustion when profiling busy systems SQL Profiler (1)
  • 9. © 2016 EDB. All rights reserved. 9 • Records 20+ statistics as well as the query plan and query text for all appropriate queries executed during the profiling run • Browse the captured data, with powerful filtering capabilities to help discover expensive queries • View the query text executed, and text and graphical plans • View aggregate statistics, e.g: • This query executed 27 times during the run • This query was responsible for 58% of cache misses during the run • Integrates with the Index Advisor when used with EDB Postgres Advanced Server SQL Profiler (2)
  • 10. © 2016 EDB. All rights reserved. 10 Demo #2 SQL Profiler
  • 11. © 2016 EDB. All rights reserved. 11 • Probes execute on schedules, collecting one or more metrics about the system • Each probe operates at a specific level of the logical object hierarchy: • Host/OS • Database Server • Database • Schema • Each individual instance of a probe may be tuned: • Enabled/disabled • Execution frequency • Data retention 24x7 Monitoring (1)
  • 12. © 2016 EDB. All rights reserved. 12 • Probes may be: • Internal (implemented as part of the PEM Agent in C++) • SQL • WMI • Batch/shell • Custom probes may be implemented in SQL, WMI or Batch/shell to monitor domain-specific metrics • Individual metrics may be cumulative or point-in-time values • Individual metrics may be graph-able numerics, or other datatypes such as strings 24x7 Monitoring (2)
  • 13. © 2016 EDB. All rights reserved. 13 Demo #3 Probe Configuration & Dashboards
  • 14. © 2016 EDB. All rights reserved. 14 • Metric data may be used in the Capacity Manager for visualisation • Save/load report templates • Re-use graph definitions in custom dashboards • Plot multiple metrics from anywhere in the logical object hierarchy • Data aggregation method selected on a per-metric basis • Specify timeframe based on: • Start -> End date/time (past, present or future) • Start date -> Point at which a metric exceeds or falls below a value • Data that exceeds the recorded available data will be extrapolated using a linear trend analysis algorithm to allow predictive reporting Capacity Management
  • 15. © 2016 EDB. All rights reserved. 15 Demo #4 Capacity Manager
  • 16. © 2016 EDB. All rights reserved. 16 • An alerting engine constantly monitors collected metrics for values that fall outside acceptable minimum or maximum levels • Templates are used to define alerts on each object type, tailored to the needs of each instance of the object • Threshold values may be specified for low, medium and high level alerts, along with an operator to denote whether low or high values are to be detected • Some templates allow additional parameters to be defined, for example, “Number of ERRORs in the Postgres Log in the last N minutes • Users can create custom alert templates from any data collected for which a scalar numeric value can be calculated Alerting (1)
  • 17. © 2016 EDB. All rights reserved. 17 • Alerts can be sent to users: • Visually, through the PEM dashboards • Via SNMP Traps to an upstream monitoring system (a database function is included to generate a MIB file) • Via SMTP to email recipients, grouped as needed to cover different alert levels or hours of the day • Via Nagios passive service checks to a Nagios installation (database functions are included to generate host and service definitions) • Scripts may be executed in response to alert level changes: • Either on the affected host, for example, to restart a service • or on the PEM server, for example, to call the RESTful API of an SMS service provider or chat bot in a sysadmin channel/chatroom Alerting (2)
  • 18. © 2016 EDB. All rights reserved. 18 Demo #5 Alerting
  • 19. © 2016 EDB. All rights reserved. 19 Questions?
  • 20. © 2016 EDB. All rights reserved. 20