SlideShare a Scribd company logo
Must-Know Postgres Extensions
for DBAs and Developers During
Migration
Deepak Mahto
DataCloudGaze Consulting
© 2024 All Rights Reserved
About Me
I am Deepak Mahto, and I like to call myself a
Database Guy.
● Founder of DataCloudGaze Consulting.
● I have 15+ years of database experience,
with more than 7 years in cloud and
migrations.
● I have published 150+ technical blogs on
databases.
● I live in Mumbai and have a 3-year-old child.
● Loves to explore street food.
© 2024 All Rights Reserved
Agenda
● What are Postgres Extensions and Their Importance
● Some Fun Facts About Extensions
● List of Extensions to Aid in Migration from Heterogeneous Sources Like
Oracle and MSSQL
© 2024 All Rights Reserved
What is extension?
PostgreSQL's extensibility allows for seamless integration of extensions,
making them function like built-in features, thus enhancing its capabilities
and flexibility.
© 2024 All Rights Reserved
Extensive versatility of Extension’s
Reference - https://cloud.tembo.io
© 2024 All Rights Reserved
Create Extension in Postgres
CREATE EXTENSION loads and manages new extensions, requiring appropriate
privileges.
© 2024 All Rights Reserved
Postgres fun fact - default extension.
PL/pgSQL is a loadable procedural language for the PostgreSQL database
system that is default extension created with each new database.
© 2024 All Rights Reserved
More supported Procedural Language as extensions
● PL/R - PostgreSQL support for R as a procedural language (PL)
● PL/V8 - A procedural language in JavaScript powered by V8
● PL/Tcl - Tcl procedural language for PostgreSQL.
● PL/Perl - The Perl procedural language for PostgreSQL.
● PL/Rust - Procedural language in the Rust programming.
● PL/Python - Untrusted procedural language for PostgreSQL.
More..
pg_stat_statements
Track statistics of SQL planning and execution
pg_stat_statements - toplevel to track nested calls.
Problematic SQL!
pg_stat_statements - toplevel to track nested calls.
*pg_stat_statements.track = 'all' (only for non prod or specific session)
Identify problematic sql within procedural
block.
© 2024 All Rights Reserved
pg_hint_plan - Influence sql performance
Makes it possible to tweak PostgreSQL execution plans using so-called
"hints" in SQL comments
Influence access
path and
Join method
hypopg - Invisible Indexes
PostgreSQL extension adding support for hypothetical indexes
Validate and test indexes
before actually creating
it.
orafce - Oracle’s compatibility functions and packages
Emulate a subset of functions and packages from the Oracle RDBMS.
oracle_fdw - Foreign Data Wrapper for Oracle
Facilitate seamless data migration and integration between Oracle databases
and PostgreSQL.
pgtt - Temporary Table across schema
Use Oracle-style Global Temporary Tables and the others RDBMS.
Session 1
Session 2
pgaudit - Compliance and Regulatory
provides detailed session and/or object audit logging via the standard
PostgreSQL logging facility.
pgaudit
Configuring custom logging based on compliance requirement.
Table Partitioning Maintenance –
pg_partman/pg_cron
© 2024 All Rights Reserved
PL/pgSQL Conversion - Challenge
postgres=# SELECT func_demo1();
ERROR: column "col1" does not exist
LINE 1: SELECT 1 WHERE COL1 =
1
QUERY: SELECT 1
WHERE COL1 = 1
CONTEXT: PL/pgSQLfunction
func_demo1() line 4 at SQL statement
PL/pgSQL functions aren't syntax-checked until executed.
© 2024 All Rights Reserved
plpgsql_check extension to rescue.
Extension serves as a comprehensive linter for plpgsql in Postgres
● Utilizes the internal PostgreSQL parser/evaluator to display runtime errors.
● Parses SQL inside routines to identify errors not typically found during
"CREATE PROCEDURE/FUNCTION" commands.
● The plpgsql_check extension detects issues in PL/pgSQL code:
undefined/unused variables, type mismatches, control flow errors, incorrect
function calls, trigger problems, and SQL statement errors.
© 2024 All Rights Reserved
Some more essential extensions
- pg_repack - lets you remove bloat from tables and indexes as online.
- pglogical - PostgreSQL Logical Replication - Change Data Capture.
- hydra_columnar - Analytics- Columnar storage for Postgres
- passwordcheck* - Checks and rejects weak passwords.
- postgresql_anonymizer - Anonymization & Data Masking.
- auto_explain - logging execution plans of slow statements
automatically.
© 2024 All Rights Reserved
Thank you!
https://www.datacloudgaze.com/
https://www.linkedin.com/in/mahtodeepak/
https://x.com/mahtodeepak05
https://databaserookies.wordpress.com/

More Related Content

PPTX
Using the PostgreSQL Extension Ecosystem for Advanced Analytics
PDF
PostgreSQL Extensions: A deeper look
PDF
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
PDF
Useful PostgreSQL Extensions
 
PDF
Learning postgresql
PDF
PostgreSQL - Case Study
PDF
Beyond Postgres: Interesting Projects, Tools and forks
PDF
Postgresql Up And Running Regina Obe Leo Hsu
Using the PostgreSQL Extension Ecosystem for Advanced Analytics
PostgreSQL Extensions: A deeper look
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Useful PostgreSQL Extensions
 
Learning postgresql
PostgreSQL - Case Study
Beyond Postgres: Interesting Projects, Tools and forks
Postgresql Up And Running Regina Obe Leo Hsu

Similar to Must Know Postgres Extension for DBA and Developer during Migration (20)

PDF
PostgreSQL Server Programming 2nd Edition Usama Dar
PDF
PostgreSQL Server Programming 2nd Edition Usama Dar
PDF
Advanced pg_stat_statements: Filtering, Regression Testing & more
PDF
Get PostgreSQL Server Programming - Second Edition Dar free all chapters
PDF
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
KEY
Building and Distributing PostgreSQL Extensions Without Learning C
KEY
PostgreSQL
PDF
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
PDF
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
PPTX
Oracle to Postgres Schema Migration Hustle
 
PDF
0292-introduction-postgresql.pdf
PDF
Migrating to postgresql
PDF
PostgreSQL Server Programming 2nd Edition Usama Dar
PDF
Rohit_vyas_PGDay_Presentation
PDF
Case Studies on PostgreSQL
KEY
Releasing PostgreSQL Extension on PGXN
PDF
PostgreSQL Server Programming - Second Edition Dar
PPTX
TechEvent PostgreSQL Best Practices
PDF
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
PPTX
Postgre sql best_practices
PostgreSQL Server Programming 2nd Edition Usama Dar
PostgreSQL Server Programming 2nd Edition Usama Dar
Advanced pg_stat_statements: Filtering, Regression Testing & more
Get PostgreSQL Server Programming - Second Edition Dar free all chapters
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
Building and Distributing PostgreSQL Extensions Without Learning C
PostgreSQL
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
Oracle to Postgres Schema Migration Hustle
 
0292-introduction-postgresql.pdf
Migrating to postgresql
PostgreSQL Server Programming 2nd Edition Usama Dar
Rohit_vyas_PGDay_Presentation
Case Studies on PostgreSQL
Releasing PostgreSQL Extension on PGXN
PostgreSQL Server Programming - Second Edition Dar
TechEvent PostgreSQL Best Practices
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
Postgre sql best_practices
Ad

More from Mydbops (20)

PDF
Scaling TiDB for Large-Scale Application
PDF
AWS MySQL Showdown - RDS vs RDS Multi AZ vs Aurora vs Serverless - Mydbops...
PDF
Mastering Vector Search with MongoDB Atlas - Manosh Malai - Mydbops MyWebinar 39
PDF
Migration Journey To TiDB - Kabilesh PR - Mydbops MyWebinar 38
PDF
AWS Blue Green Deployment for Databases - Mydbops
PDF
What's New In MySQL 8.4 LTS Mydbops MyWebinar Edition 36
PDF
What's New in PostgreSQL 17? - Mydbops MyWebinar Edition 35
PDF
What's New in MongoDB 8.0 - Mydbops MyWebinar Edition 34
PDF
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
PDF
Read/Write Splitting using MySQL Router - Mydbops Meetup16
PDF
TiDB - From Data to Discovery: Exploring the Intersection of Distributed Dat...
PDF
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
PDF
Demystifying Real time Analytics with TiDB
PDF
Efficient MySQL Indexing and what's new in MySQL Explain
PDF
Scale your database traffic with Read & Write split using MySQL Router
PDF
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PDF
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
PDF
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
PDF
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
PDF
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
Scaling TiDB for Large-Scale Application
AWS MySQL Showdown - RDS vs RDS Multi AZ vs Aurora vs Serverless - Mydbops...
Mastering Vector Search with MongoDB Atlas - Manosh Malai - Mydbops MyWebinar 39
Migration Journey To TiDB - Kabilesh PR - Mydbops MyWebinar 38
AWS Blue Green Deployment for Databases - Mydbops
What's New In MySQL 8.4 LTS Mydbops MyWebinar Edition 36
What's New in PostgreSQL 17? - Mydbops MyWebinar Edition 35
What's New in MongoDB 8.0 - Mydbops MyWebinar Edition 34
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Read/Write Splitting using MySQL Router - Mydbops Meetup16
TiDB - From Data to Discovery: Exploring the Intersection of Distributed Dat...
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
Demystifying Real time Analytics with TiDB
Efficient MySQL Indexing and what's new in MySQL Explain
Scale your database traffic with Read & Write split using MySQL Router
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
Ad

Recently uploaded (20)

PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Big Data Technologies - Introduction.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Modernizing your data center with Dell and AMD
Per capita expenditure prediction using model stacking based on satellite ima...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Mobile App Security Testing_ A Comprehensive Guide.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The AUB Centre for AI in Media Proposal.docx
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Advanced Soft Computing BINUS July 2025.pdf
madgavkar20181017ppt McKinsey Presentation.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
GamePlan Trading System Review: Professional Trader's Honest Take
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity

Must Know Postgres Extension for DBA and Developer during Migration

  • 1. Must-Know Postgres Extensions for DBAs and Developers During Migration Deepak Mahto DataCloudGaze Consulting
  • 2. © 2024 All Rights Reserved About Me I am Deepak Mahto, and I like to call myself a Database Guy. ● Founder of DataCloudGaze Consulting. ● I have 15+ years of database experience, with more than 7 years in cloud and migrations. ● I have published 150+ technical blogs on databases. ● I live in Mumbai and have a 3-year-old child. ● Loves to explore street food.
  • 3. © 2024 All Rights Reserved Agenda ● What are Postgres Extensions and Their Importance ● Some Fun Facts About Extensions ● List of Extensions to Aid in Migration from Heterogeneous Sources Like Oracle and MSSQL
  • 4. © 2024 All Rights Reserved What is extension? PostgreSQL's extensibility allows for seamless integration of extensions, making them function like built-in features, thus enhancing its capabilities and flexibility.
  • 5. © 2024 All Rights Reserved Extensive versatility of Extension’s Reference - https://cloud.tembo.io
  • 6. © 2024 All Rights Reserved Create Extension in Postgres CREATE EXTENSION loads and manages new extensions, requiring appropriate privileges.
  • 7. © 2024 All Rights Reserved Postgres fun fact - default extension. PL/pgSQL is a loadable procedural language for the PostgreSQL database system that is default extension created with each new database.
  • 8. © 2024 All Rights Reserved More supported Procedural Language as extensions ● PL/R - PostgreSQL support for R as a procedural language (PL) ● PL/V8 - A procedural language in JavaScript powered by V8 ● PL/Tcl - Tcl procedural language for PostgreSQL. ● PL/Perl - The Perl procedural language for PostgreSQL. ● PL/Rust - Procedural language in the Rust programming. ● PL/Python - Untrusted procedural language for PostgreSQL. More..
  • 9. pg_stat_statements Track statistics of SQL planning and execution
  • 10. pg_stat_statements - toplevel to track nested calls. Problematic SQL!
  • 11. pg_stat_statements - toplevel to track nested calls. *pg_stat_statements.track = 'all' (only for non prod or specific session) Identify problematic sql within procedural block.
  • 12. © 2024 All Rights Reserved pg_hint_plan - Influence sql performance Makes it possible to tweak PostgreSQL execution plans using so-called "hints" in SQL comments Influence access path and Join method
  • 13. hypopg - Invisible Indexes PostgreSQL extension adding support for hypothetical indexes Validate and test indexes before actually creating it.
  • 14. orafce - Oracle’s compatibility functions and packages Emulate a subset of functions and packages from the Oracle RDBMS.
  • 15. oracle_fdw - Foreign Data Wrapper for Oracle Facilitate seamless data migration and integration between Oracle databases and PostgreSQL.
  • 16. pgtt - Temporary Table across schema Use Oracle-style Global Temporary Tables and the others RDBMS. Session 1 Session 2
  • 17. pgaudit - Compliance and Regulatory provides detailed session and/or object audit logging via the standard PostgreSQL logging facility.
  • 18. pgaudit Configuring custom logging based on compliance requirement.
  • 19. Table Partitioning Maintenance – pg_partman/pg_cron
  • 20. © 2024 All Rights Reserved PL/pgSQL Conversion - Challenge postgres=# SELECT func_demo1(); ERROR: column "col1" does not exist LINE 1: SELECT 1 WHERE COL1 = 1 QUERY: SELECT 1 WHERE COL1 = 1 CONTEXT: PL/pgSQLfunction func_demo1() line 4 at SQL statement PL/pgSQL functions aren't syntax-checked until executed.
  • 21. © 2024 All Rights Reserved plpgsql_check extension to rescue. Extension serves as a comprehensive linter for plpgsql in Postgres ● Utilizes the internal PostgreSQL parser/evaluator to display runtime errors. ● Parses SQL inside routines to identify errors not typically found during "CREATE PROCEDURE/FUNCTION" commands. ● The plpgsql_check extension detects issues in PL/pgSQL code: undefined/unused variables, type mismatches, control flow errors, incorrect function calls, trigger problems, and SQL statement errors.
  • 22. © 2024 All Rights Reserved Some more essential extensions - pg_repack - lets you remove bloat from tables and indexes as online. - pglogical - PostgreSQL Logical Replication - Change Data Capture. - hydra_columnar - Analytics- Columnar storage for Postgres - passwordcheck* - Checks and rejects weak passwords. - postgresql_anonymizer - Anonymization & Data Masking. - auto_explain - logging execution plans of slow statements automatically.
  • 23. © 2024 All Rights Reserved Thank you! https://www.datacloudgaze.com/ https://www.linkedin.com/in/mahtodeepak/ https://x.com/mahtodeepak05 https://databaserookies.wordpress.com/