SlideShare a Scribd company logo
Postgres in Production – 
Enterprise Best Practices 
© 2014 EDB All rights reserved. 1
Objectives 
• Explore key Postgres usage patterns, to expose 
− Challenges users face in adoption, development, deployment 
and maintenance 
− Frequently used tuning parameters 
− Common database maintenance practices 
− Database back-up and recovery strategies 
• Provide empirical data to help you anticipate needs 
during your database lifecycles 
• Share ideas and resources to help you address 
problems before they occur 
© 2014 EDB All rights reserved. 2
Agenda 
• EnterpriseDB Overview (quick) 
• Postgres Support Experiences 
Explore what kinds of issues your peers are experiencing with 
Postgres, and when they’re encountering those issues 
• Database Health Checks 
Share what we’ve learned in the field about how Postgres 
databases are deployed, tuned and supported 
• Summary and Useful Resources 
• Q&A 
© 2014 EDB All rights reserved. 3
Brief EDB Overview 
© 2014 EnterpriseDB Corporation. All rights reserved. 4
Postgres Plus 
Advanced Server Postgres Plus 
Management Performance 
© 2014 EnterpriseDB Corporation. All rights reserved. 5 
Cloud Database 
High Availability 
REMOTE 
DBA 24x7 
SUPPORT 
PROFESSIONAL 
SERVICES 
TRAINING 
EDB Serves 
All Your Postgres Needs 
PostgreSQL 
Security
POSTGRES 
innovation 
Services 
& training 
© 2014 EnterpriseDB Corporation. All rights reserved. 6 
ENTERPRISE 
reliability 
24/7 
support 
Enterprise-class 
features & tools 
Indemnification 
Product 
road-map 
Control 
Thousands 
of developers 
Fast 
development 
cycles 
Low cost 
No vendor 
lock-in 
Advanced 
features 
Enabling commercial 
adoption of Postgres
Postgres Support Experiences 
© 2014 EnterpriseDB Corporation. All rights reserved. 7
Why We Analyze Support Tickets 
• Adoption of Postgres is growing fast 
− More and more Postgres users are not not ‘dyed in the wool’ Postgres 
users – they come from Oracle, MS SQL, DB2, etc. 
• Postgres is moving into complex, mission-critical applications 
− Question patterns are changing from simple to complex 
− Expertise level is changing – when the customer calls, it is with a 
(more) difficult problem or urgent issue 
• How do we make Postgres users even more successful? 
− Targeted white papers 
− Targeted training for support team 
− Pro-active training for users as part of our customer enablement 
process 
− Balanced product strategy of new features, new capabilities and 
usability 
© 2014 EnterpriseDB Corporation. All rights reserved. 8
Ticket Volumes & Multi Year Growth 
• Q1 2014: ~ 2500 total customers 
• Analysis in this presentation is based on a representative 
sample of tickets raised over a 12 months period 
© 2014 EnterpriseDB Corporation. All rights reserved. 9
Tickets and Platforms 
Observations 
• Postgres Plus Advanced Server: Strong emphasis on proprietary or commercially 
supported OSS 
• PostgreSQL: Significantly less emphasis on proprietary or commercially supported 
OSS – even though the customer has commercially supported Postgres 
Distribution 
© 2014 EnterpriseDB Corporation. All rights reserved. 10
When do customers call? 
© 2014 EnterpriseDB Corporation. All rights reserved. 11
What Do Customers Call About? 
100% 
90% 
80% 
70% 
60% 
50% 
40% 
30% 
20% 
10% 
0% 
POC Dev Deployment Maintenance 
© 2014 EnterpriseDB Corporation. All rights reserved. 12 
Tuning 
Product Awareness 
How to 
Enhancements 
Corruption 
Bug 
# Tickets Phase 
Category POC Dev Deployment Maintenance Grand Total 
Bug 8% 22% 9% 7% 10% 
Corruption 0% 0% 0% 6% 2% 
Enhancements 3% 4% 1% 0% 1% 
How to 41% 33% 41% 29% 35% 
Product Awareness 46% 39% 44% 39% 41% 
Tuning 3% 2% 5% 19% 10% 
Grand Total 100% 100% 100% 100% 100%
Where Do Users Need Help 
# Tickets Phase 
Category POC Dev Deployment Maintenance Grand Total 
Connectors 0% 2% 1% 0% 3% 
Bug 0% 0% 0% 0% 1% 
How to 0% 1% 0% 0% 1% 
Product Awareness 0% 1% 0% 0% 1% 
Database 10% 9% 17% 37% 73% 
Bug 1% 2% 1% 2% 6% 
Corruption 0% 0% 0% 2% 2% 
Enhancements 0% 0% 0% 0% 1% 
How to 4% 3% 6% 10% 23% 
Product Awareness 4% 3% 8% 15% 31% 
Tuning 0% 0% 1% 7% 9% 
Replication 1% 4% 4% 2% 12% 
Bug 0% 1% 0% 0% 2% 
How to 0% 0% 3% 1% 4% 
Product Awareness 1% 2% 1% 0% 4% 
Tuning 0% 0% 0% 1% 1% 
Utilities 1% 3% 6% 3% 12% 
Bug 0% 1% 1% 0% 2% 
Enhancements 0% 0% 0% 0% 0% 
How to 1% 1% 3% 1% 6% 
Product Awareness 0% 1% 3% 1% 5% 
Grand Total 12% 17% 28% 42% 100% 
© 2014 EnterpriseDB Corporation. All rights reserved. 13
Select Top questions (not in rank order) 
Deployment/Database/Product Awareness & How To 
− How to set up connection pooling? 
− How to set up Hot Standby and Streaming Replica? 
− How to add table spaces? 
− How to partition? 
− How to upgrade from major version? 
Maintenance/Database/Product Awareness & How To 
− How to find bloat in tables & indexes? 
− How to enable auditing selectively without performance impact? 
− What are the effects of changes to the values of postgresql.conf 
file parameters wal_writer_delay, bgwriter_delay? 
− What is the correct configuration of hba_conf? 
© 2014 EnterpriseDB Corporation. All rights reserved. 14
Best Practices and Lessons from Support 
• The majority of questions arise after PoC and 
Development 
• Deployment and Maintenance are the more 
challenging phases 
• Plan early to understand necessary practices 
− Backup, recovery, high availability strategies 
− Configuration parameter tuning to support growth 
− Vacuum and bloat 
− Connection pooling 
© 2014 EnterpriseDB Corporation. All rights reserved. 15
Lessons Learned from the AHC 
© 2014 EnterpriseDB Corporation. All rights reserved. 16
Architectural Health Check 
• Systematic top-to-bottom review of the customer’s 
Postgres production installation 
• Identifies issues and improvement opportunities in: 
− Performance 
− Scalability and support for business and data growth 
− Availability – Backup strategies, recovery, replication and 
failover 
− Maintenance and tuning 
− Upgrades 
• The following analysis is based on a set of 20 AHCs 
executed in 2013 
© 2014 EnterpriseDB Corporation. All rights reserved. 17
100%	 
90%	 
80%	 
70%	 
60%	 
50%	 
40%	 
30%	 
20%	 
10%	 
0%	 
Top Database Parameter Adjustments – Ordered by Frequency 
effec ve_cache_size	 
Top	Database	Parameter	Adjustments	-	Ordered	by	Frequency	 
wal_buffers	 
maintenance_work_mem	 
shared_buffers	 
bgwriter_lru_maxpages	 
work_mem	 
random_page_cost	 
checkpoint_segments	 
bgwriter_lru_mul plier	 
cpu_tuple_cost	 
checkpoint_comple on_target	 
checkpoint_ meout	 
© 2014 EnterpriseDB Corporation. All rights reserved. 18 
Red bars: 
experts expected top parameters, 
including vacuum_cost_limit, 
log_line_prefix, 
log_min_duration_statement, 
log_checkpoints 
checkpoint_warning	 
autovacuum_vacuum_cost_delay	 
autovacuum_vacuum_threshold	 
prefix	 
waitsstatement	 
	 
factor	 
line_lock_scale_log_log_dura vacuum_on_log_autovacuum_min_autovacuum_nap me	 
log_autovacuum_min_dura on
Kernel Parameters 
16 
14 
12 
10 
8 
6 
4 
2 
0 
© 2014 EnterpriseDB Corporation. All rights reserved. 19
Backup and Standby 
Snapshot 
7% 
Backup Approach 
© 2014 EnterpriseDB Corporation. All rights reserved. 20 
Standby Approach 
hot 
47% 
None 
18% 
cold 
12% 
warm 
23% 
Physical 
Only 
36% 
Logical 
Only 
29% 
FS 
Physical 
and 
Logical 
14% 
None 
14% 
43% of customers could not execute 
PITR (prior to AHC) – some had NO 
backup in place 
30% of customers would have been 
slow or unable to recover from failure
Maintenance Tasks 
Missing 
Indexes 
Bloated Tables 
© 2014 EnterpriseDB Corporation. All rights reserved. 21 
Unused 
Indexes 
39% 
Bloated 
Indexes 
30% 
13% 
9% 
Missing 
PK 
9% 
Bloat management 
(43%) is a key 
production 
problem 
specific to 
Postgres
Observations from the AHCs 
• Majority of Postgres production deployments are on 
Linux based OS 
• Storage system is a key deployment consideration – 
DAS/SAN/NFS 
• OS System Adjustments (dirty_background_ratio & 
dirty_ratio) are also a major adjustment (70% & 45%) 
© 2014 EnterpriseDB Corporation. All rights reserved. 22
Stage: post-production 
Primary Issue: 
• Outage due to replication 
failure - insufficient log info to 
determine true root cause 
Potential Pain Points 
• Concerns have reached limits 
of scale and meeting 
anticipated growth demands 
© 2014 EnterpriseDB Corporation. All rights reserved. 23 
Recommendations 
• Backup and recovery strategies 
• Implement continuous archive 
recovery in addition to streaming 
replication 
• Revised backup strategy with PITR 
• Tune auto-vacuum settings and 
manually vacuum large tables 
• Indexes – create concurrent 
indexes, REINDEX to reduce bloat 
• Parameter tuning – various for 
kernel, memory settings and WALs 
AHC Case Study #1 
Use Case: on-line advertising service with hosted chat
Stage: pre-deployment 
Primary Issues: 
• Performance in returning 
results and timeouts 
• No backup strategy in place 
Potential Pain Points 
• Expected data volume growth 
and increased analysis – 
scalability concerns 
© 2014 EnterpriseDB Corporation. All rights reserved. 24 
Recommendations 
• Kernel param updates (8)- 
kernel.shmmax, kernel.shmall, 
vm.dirty_ratio, 
vm.dirty_background_ratio,… 
• Database param changes (11) - 
effective_cache_size, 
shared_buffers, 
bgwriter_lru_maxpages, 
wal_buffers, work_mem, … 
• Re-architect specific heavily-used 
database function 
• Detailed backup and availability 
strategies 
AHC Case Study #2 
Use Case: data warehouse reporting at customer sites
Stage: post-production 
Primary Issues: 
• System performance 
• Running out of connections 
• Slow queries/ locked tables 
• Advice on new SW release 
Potential Pain Points 
• Concern for increased 
workloads and scalability 
© 2014 EnterpriseDB Corporation. All rights reserved. 25 
Recommendations 
• max_connections was actually too 
high, work_mem too low 
• Increase checkpoint parameters 
− checkpoint_segments, 
checkpoint_timeout, 
checkpoint_completion_ 
target, checkpoint_warning 
• Tune storage-related params (SAN) 
- DB, memory, file system 
work_mem, random_page_cost 
• Upgrade for performance and 
security improvements 
• As workload increases, increase 
RAM and re-tune related memory 
config. parameters 
AHC Case Study #3 
Use Case: claims mgmt. system and reporting application
Summary and Useful Resources 
© 2014 EnterpriseDB Corporation. All rights reserved. 26
Summary 
• Postgres users consistently experience different kinds 
of challenges throughout the database lifecycle 
− Postgres product knowledge is a critical need at all lifecycle 
stages 
• Many DBAs would benefit from better knowledge of 
tuning Postgres for their storage infrastructures 
• Tuning databases early in the lifecycle can save a lot of 
time, hassle and user friction after they’re deployed 
• Many organizations lack appropriate backup and 
recovery strategies 
© 2014 EnterpriseDB Corporation. All rights reserved. 27
Backup and Recovery Strategies 
• Why do you need backup and recovery? Backup and 
Recovery Strategies protect you in case of: 
− Catastrophic Device Failure 
− Site Failure 
− Maintenance 
− Operator Error 
− Compliance 
− Data Corruption 
• Key takeaways: 
− Logical backup provides granularity in objects (tables, table 
spaces, databases); Physical backups provide granularity in 
time for PITR. 
− Understand requirements before diving into technology 
solution 
© 2014 EnterpriseDB Corporation. All rights reserved. 28
Backup and Recovery Strategies 
• Postgres provides 
− Logical backup (pg_dump) 
− Binary/physical backup (Filesystem Snapshots & 
pg_basebackup) 
− WAL (write ahead logs) 
− Streaming replication 
− Delayed replication 
• Advanced solutions, such as RHCS, Veritas Clustering , 
EFM and EDB BART - (now in Beta) augment 
the basic capabilities 
© 2014 EnterpriseDB Corporation. All rights reserved. 29
Architectural Health Check 
• Performance, Scalability, Availability 
• Three-day in-depth Postgres database review 
• Analysis of platform, database architecture and application usage 
• Provides tuning and management guidance based on EDB’s 
expert best practices 
Get an Architectural Health Check when you are 
− Not 100% sure about your backup/recovery strategy 
− Unsure your database is optimally tuned for your apps 
− Moving Postgres databases to the Cloud 
− Upgrading your servers to multi-core, high memory devices 
− Experiencing high growth in application usage 
− Experiencing deterioration of read and/or write throughput 
http://enterprisedb.com/services/packaged-services/health-check 
© 2014 EnterpriseDB Corporation. All rights reserved. 30
For more information about an Architectural Health Check, 
please visit www.enterprisedb.com/ahc 
or email us - sales@enterprisedb.com 
© 2014 EnterpriseDB Corporation. All rights reserved. 31

More Related Content

Similar to Postgres in production.2014

Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014
EDB
 
Migrations, Health Checks, and Support Experiences - Postgres from the Servic...
Migrations, Health Checks, and Support Experiences - Postgres from the Servic...Migrations, Health Checks, and Support Experiences - Postgres from the Servic...
Migrations, Health Checks, and Support Experiences - Postgres from the Servic...
EDB
 
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
 
EnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAsEnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAs
EDB
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupBest Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture Setup
EDB
 
Resume_Utpal
Resume_UtpalResume_Utpal
Resume_UtpalUtpal Das
 
Oracle Database Lifecycle Management
Oracle Database Lifecycle ManagementOracle Database Lifecycle Management
Oracle Database Lifecycle Management
Hari Srinivasan
 
Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014
EDB
 
Tapping into New Postgres Resources with Remote DBAs
Tapping into New Postgres Resources with Remote DBAsTapping into New Postgres Resources with Remote DBAs
Tapping into New Postgres Resources with Remote DBAs
EDB
 
ODW 2021 - Automated patching and compliance to improve database security.pptx
ODW 2021 - Automated patching and compliance to improve database security.pptxODW 2021 - Automated patching and compliance to improve database security.pptx
ODW 2021 - Automated patching and compliance to improve database security.pptx
Paul Breniuc
 
The Science of Predictive Maintenance: IBM's Predictive Analytics Solution
The Science of Predictive Maintenance: IBM's Predictive Analytics SolutionThe Science of Predictive Maintenance: IBM's Predictive Analytics Solution
The Science of Predictive Maintenance: IBM's Predictive Analytics Solution
Senturus
 
Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos...
 Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos... Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos...
Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos...
Senturus
 
Storage Sizing for SAP
Storage Sizing for SAPStorage Sizing for SAP
Storage Sizing for SAP
Cenk Ersoy
 
Oracle Big Data Appliance and Big Data SQL for advanced analytics
Oracle Big Data Appliance and Big Data SQL for advanced analyticsOracle Big Data Appliance and Big Data SQL for advanced analytics
Oracle Big Data Appliance and Big Data SQL for advanced analytics
jdijcks
 
Dairy.pptx
Dairy.pptxDairy.pptx
Dairy.pptx
Temporary57
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to Postgres
EDB
 
Operating a Highly Available Cloud Service
Operating a Highly Available Cloud ServiceOperating a Highly Available Cloud Service
Operating a Highly Available Cloud Service
Depankar Neogi
 
MDS.BackupandRecoveryServices.2011.1006.B
MDS.BackupandRecoveryServices.2011.1006.BMDS.BackupandRecoveryServices.2011.1006.B
MDS.BackupandRecoveryServices.2011.1006.BTracy Hawkey
 

Similar to Postgres in production.2014 (20)

Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014
 
Migrations, Health Checks, and Support Experiences - Postgres from the Servic...
Migrations, Health Checks, and Support Experiences - Postgres from the Servic...Migrations, Health Checks, and Support Experiences - Postgres from the Servic...
Migrations, Health Checks, and Support Experiences - Postgres from the Servic...
 
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
 
EnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAsEnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAs
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupBest Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture Setup
 
Resume_Utpal
Resume_UtpalResume_Utpal
Resume_Utpal
 
Oracle Database Lifecycle Management
Oracle Database Lifecycle ManagementOracle Database Lifecycle Management
Oracle Database Lifecycle Management
 
Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014
 
suraj_Resume
suraj_Resumesuraj_Resume
suraj_Resume
 
Tapping into New Postgres Resources with Remote DBAs
Tapping into New Postgres Resources with Remote DBAsTapping into New Postgres Resources with Remote DBAs
Tapping into New Postgres Resources with Remote DBAs
 
ODW 2021 - Automated patching and compliance to improve database security.pptx
ODW 2021 - Automated patching and compliance to improve database security.pptxODW 2021 - Automated patching and compliance to improve database security.pptx
ODW 2021 - Automated patching and compliance to improve database security.pptx
 
The Science of Predictive Maintenance: IBM's Predictive Analytics Solution
The Science of Predictive Maintenance: IBM's Predictive Analytics SolutionThe Science of Predictive Maintenance: IBM's Predictive Analytics Solution
The Science of Predictive Maintenance: IBM's Predictive Analytics Solution
 
Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos...
 Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos... Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos...
Beyond PowerPlay: Choose the Right OLAP Tool for Your BI Environment (Cognos...
 
sagar
sagarsagar
sagar
 
Storage Sizing for SAP
Storage Sizing for SAPStorage Sizing for SAP
Storage Sizing for SAP
 
Oracle Big Data Appliance and Big Data SQL for advanced analytics
Oracle Big Data Appliance and Big Data SQL for advanced analyticsOracle Big Data Appliance and Big Data SQL for advanced analytics
Oracle Big Data Appliance and Big Data SQL for advanced analytics
 
Dairy.pptx
Dairy.pptxDairy.pptx
Dairy.pptx
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to Postgres
 
Operating a Highly Available Cloud Service
Operating a Highly Available Cloud ServiceOperating a Highly Available Cloud Service
Operating a Highly Available Cloud Service
 
MDS.BackupandRecoveryServices.2011.1006.B
MDS.BackupandRecoveryServices.2011.1006.BMDS.BackupandRecoveryServices.2011.1006.B
MDS.BackupandRecoveryServices.2011.1006.B
 

More from EDB

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

More from EDB (20)

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

Recently uploaded

"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

Postgres in production.2014

  • 1. Postgres in Production – Enterprise Best Practices © 2014 EDB All rights reserved. 1
  • 2. Objectives • Explore key Postgres usage patterns, to expose − Challenges users face in adoption, development, deployment and maintenance − Frequently used tuning parameters − Common database maintenance practices − Database back-up and recovery strategies • Provide empirical data to help you anticipate needs during your database lifecycles • Share ideas and resources to help you address problems before they occur © 2014 EDB All rights reserved. 2
  • 3. Agenda • EnterpriseDB Overview (quick) • Postgres Support Experiences Explore what kinds of issues your peers are experiencing with Postgres, and when they’re encountering those issues • Database Health Checks Share what we’ve learned in the field about how Postgres databases are deployed, tuned and supported • Summary and Useful Resources • Q&A © 2014 EDB All rights reserved. 3
  • 4. Brief EDB Overview © 2014 EnterpriseDB Corporation. All rights reserved. 4
  • 5. Postgres Plus Advanced Server Postgres Plus Management Performance © 2014 EnterpriseDB Corporation. All rights reserved. 5 Cloud Database High Availability REMOTE DBA 24x7 SUPPORT PROFESSIONAL SERVICES TRAINING EDB Serves All Your Postgres Needs PostgreSQL Security
  • 6. POSTGRES innovation Services & training © 2014 EnterpriseDB Corporation. All rights reserved. 6 ENTERPRISE reliability 24/7 support Enterprise-class features & tools Indemnification Product road-map Control Thousands of developers Fast development cycles Low cost No vendor lock-in Advanced features Enabling commercial adoption of Postgres
  • 7. Postgres Support Experiences © 2014 EnterpriseDB Corporation. All rights reserved. 7
  • 8. Why We Analyze Support Tickets • Adoption of Postgres is growing fast − More and more Postgres users are not not ‘dyed in the wool’ Postgres users – they come from Oracle, MS SQL, DB2, etc. • Postgres is moving into complex, mission-critical applications − Question patterns are changing from simple to complex − Expertise level is changing – when the customer calls, it is with a (more) difficult problem or urgent issue • How do we make Postgres users even more successful? − Targeted white papers − Targeted training for support team − Pro-active training for users as part of our customer enablement process − Balanced product strategy of new features, new capabilities and usability © 2014 EnterpriseDB Corporation. All rights reserved. 8
  • 9. Ticket Volumes & Multi Year Growth • Q1 2014: ~ 2500 total customers • Analysis in this presentation is based on a representative sample of tickets raised over a 12 months period © 2014 EnterpriseDB Corporation. All rights reserved. 9
  • 10. Tickets and Platforms Observations • Postgres Plus Advanced Server: Strong emphasis on proprietary or commercially supported OSS • PostgreSQL: Significantly less emphasis on proprietary or commercially supported OSS – even though the customer has commercially supported Postgres Distribution © 2014 EnterpriseDB Corporation. All rights reserved. 10
  • 11. When do customers call? © 2014 EnterpriseDB Corporation. All rights reserved. 11
  • 12. What Do Customers Call About? 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% POC Dev Deployment Maintenance © 2014 EnterpriseDB Corporation. All rights reserved. 12 Tuning Product Awareness How to Enhancements Corruption Bug # Tickets Phase Category POC Dev Deployment Maintenance Grand Total Bug 8% 22% 9% 7% 10% Corruption 0% 0% 0% 6% 2% Enhancements 3% 4% 1% 0% 1% How to 41% 33% 41% 29% 35% Product Awareness 46% 39% 44% 39% 41% Tuning 3% 2% 5% 19% 10% Grand Total 100% 100% 100% 100% 100%
  • 13. Where Do Users Need Help # Tickets Phase Category POC Dev Deployment Maintenance Grand Total Connectors 0% 2% 1% 0% 3% Bug 0% 0% 0% 0% 1% How to 0% 1% 0% 0% 1% Product Awareness 0% 1% 0% 0% 1% Database 10% 9% 17% 37% 73% Bug 1% 2% 1% 2% 6% Corruption 0% 0% 0% 2% 2% Enhancements 0% 0% 0% 0% 1% How to 4% 3% 6% 10% 23% Product Awareness 4% 3% 8% 15% 31% Tuning 0% 0% 1% 7% 9% Replication 1% 4% 4% 2% 12% Bug 0% 1% 0% 0% 2% How to 0% 0% 3% 1% 4% Product Awareness 1% 2% 1% 0% 4% Tuning 0% 0% 0% 1% 1% Utilities 1% 3% 6% 3% 12% Bug 0% 1% 1% 0% 2% Enhancements 0% 0% 0% 0% 0% How to 1% 1% 3% 1% 6% Product Awareness 0% 1% 3% 1% 5% Grand Total 12% 17% 28% 42% 100% © 2014 EnterpriseDB Corporation. All rights reserved. 13
  • 14. Select Top questions (not in rank order) Deployment/Database/Product Awareness & How To − How to set up connection pooling? − How to set up Hot Standby and Streaming Replica? − How to add table spaces? − How to partition? − How to upgrade from major version? Maintenance/Database/Product Awareness & How To − How to find bloat in tables & indexes? − How to enable auditing selectively without performance impact? − What are the effects of changes to the values of postgresql.conf file parameters wal_writer_delay, bgwriter_delay? − What is the correct configuration of hba_conf? © 2014 EnterpriseDB Corporation. All rights reserved. 14
  • 15. Best Practices and Lessons from Support • The majority of questions arise after PoC and Development • Deployment and Maintenance are the more challenging phases • Plan early to understand necessary practices − Backup, recovery, high availability strategies − Configuration parameter tuning to support growth − Vacuum and bloat − Connection pooling © 2014 EnterpriseDB Corporation. All rights reserved. 15
  • 16. Lessons Learned from the AHC © 2014 EnterpriseDB Corporation. All rights reserved. 16
  • 17. Architectural Health Check • Systematic top-to-bottom review of the customer’s Postgres production installation • Identifies issues and improvement opportunities in: − Performance − Scalability and support for business and data growth − Availability – Backup strategies, recovery, replication and failover − Maintenance and tuning − Upgrades • The following analysis is based on a set of 20 AHCs executed in 2013 © 2014 EnterpriseDB Corporation. All rights reserved. 17
  • 18. 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% Top Database Parameter Adjustments – Ordered by Frequency effec ve_cache_size Top Database Parameter Adjustments - Ordered by Frequency wal_buffers maintenance_work_mem shared_buffers bgwriter_lru_maxpages work_mem random_page_cost checkpoint_segments bgwriter_lru_mul plier cpu_tuple_cost checkpoint_comple on_target checkpoint_ meout © 2014 EnterpriseDB Corporation. All rights reserved. 18 Red bars: experts expected top parameters, including vacuum_cost_limit, log_line_prefix, log_min_duration_statement, log_checkpoints checkpoint_warning autovacuum_vacuum_cost_delay autovacuum_vacuum_threshold prefix waitsstatement factor line_lock_scale_log_log_dura vacuum_on_log_autovacuum_min_autovacuum_nap me log_autovacuum_min_dura on
  • 19. Kernel Parameters 16 14 12 10 8 6 4 2 0 © 2014 EnterpriseDB Corporation. All rights reserved. 19
  • 20. Backup and Standby Snapshot 7% Backup Approach © 2014 EnterpriseDB Corporation. All rights reserved. 20 Standby Approach hot 47% None 18% cold 12% warm 23% Physical Only 36% Logical Only 29% FS Physical and Logical 14% None 14% 43% of customers could not execute PITR (prior to AHC) – some had NO backup in place 30% of customers would have been slow or unable to recover from failure
  • 21. Maintenance Tasks Missing Indexes Bloated Tables © 2014 EnterpriseDB Corporation. All rights reserved. 21 Unused Indexes 39% Bloated Indexes 30% 13% 9% Missing PK 9% Bloat management (43%) is a key production problem specific to Postgres
  • 22. Observations from the AHCs • Majority of Postgres production deployments are on Linux based OS • Storage system is a key deployment consideration – DAS/SAN/NFS • OS System Adjustments (dirty_background_ratio & dirty_ratio) are also a major adjustment (70% & 45%) © 2014 EnterpriseDB Corporation. All rights reserved. 22
  • 23. Stage: post-production Primary Issue: • Outage due to replication failure - insufficient log info to determine true root cause Potential Pain Points • Concerns have reached limits of scale and meeting anticipated growth demands © 2014 EnterpriseDB Corporation. All rights reserved. 23 Recommendations • Backup and recovery strategies • Implement continuous archive recovery in addition to streaming replication • Revised backup strategy with PITR • Tune auto-vacuum settings and manually vacuum large tables • Indexes – create concurrent indexes, REINDEX to reduce bloat • Parameter tuning – various for kernel, memory settings and WALs AHC Case Study #1 Use Case: on-line advertising service with hosted chat
  • 24. Stage: pre-deployment Primary Issues: • Performance in returning results and timeouts • No backup strategy in place Potential Pain Points • Expected data volume growth and increased analysis – scalability concerns © 2014 EnterpriseDB Corporation. All rights reserved. 24 Recommendations • Kernel param updates (8)- kernel.shmmax, kernel.shmall, vm.dirty_ratio, vm.dirty_background_ratio,… • Database param changes (11) - effective_cache_size, shared_buffers, bgwriter_lru_maxpages, wal_buffers, work_mem, … • Re-architect specific heavily-used database function • Detailed backup and availability strategies AHC Case Study #2 Use Case: data warehouse reporting at customer sites
  • 25. Stage: post-production Primary Issues: • System performance • Running out of connections • Slow queries/ locked tables • Advice on new SW release Potential Pain Points • Concern for increased workloads and scalability © 2014 EnterpriseDB Corporation. All rights reserved. 25 Recommendations • max_connections was actually too high, work_mem too low • Increase checkpoint parameters − checkpoint_segments, checkpoint_timeout, checkpoint_completion_ target, checkpoint_warning • Tune storage-related params (SAN) - DB, memory, file system work_mem, random_page_cost • Upgrade for performance and security improvements • As workload increases, increase RAM and re-tune related memory config. parameters AHC Case Study #3 Use Case: claims mgmt. system and reporting application
  • 26. Summary and Useful Resources © 2014 EnterpriseDB Corporation. All rights reserved. 26
  • 27. Summary • Postgres users consistently experience different kinds of challenges throughout the database lifecycle − Postgres product knowledge is a critical need at all lifecycle stages • Many DBAs would benefit from better knowledge of tuning Postgres for their storage infrastructures • Tuning databases early in the lifecycle can save a lot of time, hassle and user friction after they’re deployed • Many organizations lack appropriate backup and recovery strategies © 2014 EnterpriseDB Corporation. All rights reserved. 27
  • 28. Backup and Recovery Strategies • Why do you need backup and recovery? Backup and Recovery Strategies protect you in case of: − Catastrophic Device Failure − Site Failure − Maintenance − Operator Error − Compliance − Data Corruption • Key takeaways: − Logical backup provides granularity in objects (tables, table spaces, databases); Physical backups provide granularity in time for PITR. − Understand requirements before diving into technology solution © 2014 EnterpriseDB Corporation. All rights reserved. 28
  • 29. Backup and Recovery Strategies • Postgres provides − Logical backup (pg_dump) − Binary/physical backup (Filesystem Snapshots & pg_basebackup) − WAL (write ahead logs) − Streaming replication − Delayed replication • Advanced solutions, such as RHCS, Veritas Clustering , EFM and EDB BART - (now in Beta) augment the basic capabilities © 2014 EnterpriseDB Corporation. All rights reserved. 29
  • 30. Architectural Health Check • Performance, Scalability, Availability • Three-day in-depth Postgres database review • Analysis of platform, database architecture and application usage • Provides tuning and management guidance based on EDB’s expert best practices Get an Architectural Health Check when you are − Not 100% sure about your backup/recovery strategy − Unsure your database is optimally tuned for your apps − Moving Postgres databases to the Cloud − Upgrading your servers to multi-core, high memory devices − Experiencing high growth in application usage − Experiencing deterioration of read and/or write throughput http://enterprisedb.com/services/packaged-services/health-check © 2014 EnterpriseDB Corporation. All rights reserved. 30
  • 31. For more information about an Architectural Health Check, please visit www.enterprisedb.com/ahc or email us - sales@enterprisedb.com © 2014 EnterpriseDB Corporation. All rights reserved. 31