SlideShare a Scribd company logo
1 of 28
Download to read offline
Useful PostgreSQL Extensions
Devrim Gündüz
Principal Systems Engineer @ EnterpriseDB
devrim.gunduz@EnterpriseDB.com
Twitter : @DevrimGunduz

© 2013 EnterpriseDB Corporation. All rights reserved.

1
Who is this guy?
●

Who is this guy?
–

I have been contributing to PostgreSQL over
the last 10 years.

–

I'm not a hacker, I work on PostgreSQL
Community RPMs and website (rarely).

–

I rarely break RPMs, but (used to) break
website more often.

–

I work at EnterpriseDB right now.

–

I live in Istanbul, Turkiye.

–

I have a son. Love Burcu.

PostgreSQL Conference Europe 2013

Useful PostgreSQL Extensions
2
Extensions are... not something like this!

PostgreSQL Conference Europe 2013

Useful PostgreSQL Extensions
3
Extensions are... not something like this!

PostgreSQL Conference Europe 2013

Useful PostgreSQL Extensions
4
The reason is:

postgres=# CREATE EXTENSION beer;
ERROR: could not open extension control file
"/usr/pgsql-9.3/share/extension/beer.control": No
such file or directory

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

5
So, what are “extensions”?

•

•

9.1+ feature
(They) “make it easier to add and remove plugins, data types,
functions etc with minimum fuss and without needing to compile
things yourself.” (Simon Riggs)

•

Formerly “contrib modules”

•

Some of them are available in PostgreSQL core distribution

•

There are many extensions available out!

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

6
Well-known, in-core extensions
There are some extensions that are already available
in PostgreSQL core:
•

hstore (Yay!)

•

postgres_fdw (YAY!)

•

unaccent, Intarray, tablefunc, pgcrypto...

•

pg_buffercache (Yay!)

•

pg_stat_statements (YAY!)

•

pg_trgm (Love it)

•

...

More is available at:
http://www.postgresql.org/docs/devel/static/contrib.html

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

7
What people say about in-core
extensions?

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

8
What people say about in-core
extensions?

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

9
What people say about in-core
extensions?

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

10
Where are the remaining extensions?

●

Pgxn.org ! (YAY)
–

Remember to use pgxnclient!

●

Pgfoundry.org (yay!)

●

Github.org (...)

●

...
Not a single place to download all extensions...

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

11
PostGIS!
●

Really an extension? ;)

•

Spatial database “extender” for PostgreSQL

•

2.1 came with great new features: Raster and topology

•

•

Requires fuzzystrmatch extension for tiger_geocoder extension
to work.
postgis, postgis_topology, postgis_figer_geocoder,

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

12
PgRouting (WIN!)

●

Extends PostGIS, with routing and network analysis
functionality.

●

2.0 is a new-born baby, and comes with great additions.

●

Comes with great number of routing algorithms.

●

Available in many packaging formats, including RPMs.

●

Depends on CGAL and Boost (...)

●

http://www.pgrouting.org

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

13
PL/proxy

•

“PL/Proxy is database partitioning system implemented as PL
language. Main idea is that proxy function will be created with
same signature as remote function to be called, so only
destination info needs to be specified inside proxy function
body.”

•

http://pgfoundry.org/projects/plproxy/

•

http://wiki.postgresql.org/wiki/PL/Proxy

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

14
mongres (yay!)

•

•

•

“Mongres is a PostgreSQL extension that runs a custom background
worker speaks mongo wire protocol. “
https://github.com/umitanuki/mongres
There is no stable release (yet). Feel free to pester @umitanuki (Hiroshi
Harada)

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

15
What people say about mongres?

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

16
ip4r (YAY!)

•

“ip4 and ip4r are types that contain a single IPv4 address and a range of
IPv4 addresses respectively. They can be used as a more flexible,
indexable version of the cidr type.”

•

http://pgfoundry.org/projects/ip4r

•

v2.0 comes with extension support.

•

ip6, ip6r, ipaddress, iprange are included in 2.0 release.

•

RPMs are already available.

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

17
pgfincore (YAY!)

•

“A set of functions to handle low-level management of relations using
mincore to explore cache memory.”

•

http://pgfoundry.org/projects/pgfincore

•

Depends on no other extensions.

•

RPMs are already available.

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

18
pgfincore (YAY!)
postgres=# select * from pgfincore('t1');
-[ RECORD 1 ]-------+-----------------relpath

| base/12896/546326

segment

|0

os_page_size

| 4096

rel_os_pages

| 88496

pages_mem

| 38371

group_mem

| 5197

os_pages_free

| 660133

databit

|

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

19
pgfincore (YAY!)

postgres=# select * from pgfadvise_willneed('t1');
-[ RECORD 1 ]----+-----------------relpath

| base/12896/546326

os_page_size

| 4096

rel_os_pages

| 88496

os_pages_free

| 583956

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

20
pgfincore (YAY!)
postgres=# select * from pgfincore('t1');
-[ RECORD 1 ]--------+-----------------relpath

| base/12896/546326

segment

|0

os_page_size

| 4096

rel_os_pages

| 88496

pages_mem

| 88496

group_mem

|1

os_pages_free

| 564335

databit

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

21
pg_jobmon

•

“Job logging and monitoring extension for PostgreSQL”

•

http://pgxn.org/dist/pg_jobmon

•

Requires dblink extension

•

RPMs will be available next week.

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

22
pg_partman

•

“ manage partitioned tables by time or ID (serial)”

•

Creates triggers, child tables, and check constraints

•

(Optional) retention policy

•

RPMs are available

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

23
pg_partman

partman=# CREATE TABLE test.part_test (col1 serial, col2 text, col3
timestamptz DEFAULT now() NOT NULL);
CREATE TABLE
partman=# SELECT partman.create_parent('test.part_test', 'col3', 'timestatic', 'daily');
create_parent
---------------

(1 row)
•

partman=# d
List of relations

•

Schema |

•
PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

Name

24
| Type | Owner
pg_partman
partman=# d
List of relations
Schema |

Name

| Type | Owner

--------+-----------------------+----------+---------test | part_test

| table

test | part_test_col1_seq

| postgres

| sequence | postgres

test | part_test_p2013_10_31 | table

| postgres

test | part_test_p2013_11_01 | table

| postgres

test | part_test_p2013_11_02 | table

| postgres

test | part_test_p2013_11_03 | table

| postgres

test | part_test_p2013_11_04 | table

| postgres

test | part_test_p2013_11_05 | table

| postgres

test | part_test_p2013_11_06 | table

| postgres

test | part_test_p2013_11_07 | table

| postgres

test | part_test_p2013_11_08 | table

| postgres

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

25
E-Maj

•

•

“E-Maj provides a set of functions to 1) log updates performed on groups
of tables and 2) rollback these updates if needed”
http://pgxn.org/dist/e-maj/
E-maj is used to:
- log updates performed on one or several sets of tables.
- cancel these updates if needed, and reset a tables set to a
predefined stable state.

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

26
oracle_fdw

•

•

“oracle_fdw is a PostgreSQL extension that provides a Foreign Data
Wrapper for easy and efficient read access to Oracle databases,
including pushdown of WHERE conditions and required columns as well
as comprehensive EXPLAIN support.
http://pgxn.org/dist/oracle_fdw

PostgreSQL Conference Europe 2013
Useful PostgreSQL Extensions

27
Useful PostgreSQL Extensions
Devrim Gündüz
Principal Systems Engineer @ EnterpriseDB
devrim.gunduz@EnterpriseDB.com
Twitter: @DevrimGunduz

© 2013 EnterpriseDB Corporation. All rights reserved.

28

More Related Content

What's hot

PostgreSQL Tuning: O elefante mais rápido que um leopardo
PostgreSQL Tuning: O elefante mais rápido que um leopardoPostgreSQL Tuning: O elefante mais rápido que um leopardo
PostgreSQL Tuning: O elefante mais rápido que um leopardo
elliando dias
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
udaymoogala
 

What's hot (20)

Ten Reasons Why You Should Prefer PostgreSQL to MySQL
Ten Reasons Why You Should Prefer PostgreSQL to MySQLTen Reasons Why You Should Prefer PostgreSQL to MySQL
Ten Reasons Why You Should Prefer PostgreSQL to MySQL
 
PostgreSQL Tuning: O elefante mais rápido que um leopardo
PostgreSQL Tuning: O elefante mais rápido que um leopardoPostgreSQL Tuning: O elefante mais rápido que um leopardo
PostgreSQL Tuning: O elefante mais rápido que um leopardo
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An Introduction
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQL
 
Aulas de banco de dados
Aulas de banco de dadosAulas de banco de dados
Aulas de banco de dados
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Postgresql tutorial
Postgresql tutorialPostgresql tutorial
Postgresql tutorial
 
Powering Interactive BI Analytics with Presto and Delta Lake
Powering Interactive BI Analytics with Presto and Delta LakePowering Interactive BI Analytics with Presto and Delta Lake
Powering Interactive BI Analytics with Presto and Delta Lake
 
PG-Strom - GPGPU meets PostgreSQL, PGcon2015
PG-Strom - GPGPU meets PostgreSQL, PGcon2015PG-Strom - GPGPU meets PostgreSQL, PGcon2015
PG-Strom - GPGPU meets PostgreSQL, PGcon2015
 
State transfer With Galera
State transfer With GaleraState transfer With Galera
State transfer With Galera
 
Webinar: PostgreSQL continuous backup and PITR with Barman
Webinar: PostgreSQL continuous backup and PITR with BarmanWebinar: PostgreSQL continuous backup and PITR with Barman
Webinar: PostgreSQL continuous backup and PITR with Barman
 
Alta disponibilidade com PostgreSQL
Alta disponibilidade com PostgreSQLAlta disponibilidade com PostgreSQL
Alta disponibilidade com PostgreSQL
 
Oficina Puppet - Aprenda a Gerenciar Configurações
Oficina Puppet - Aprenda a Gerenciar ConfiguraçõesOficina Puppet - Aprenda a Gerenciar Configurações
Oficina Puppet - Aprenda a Gerenciar Configurações
 
Auditing and Monitoring PostgreSQL/EPAS
Auditing and Monitoring PostgreSQL/EPASAuditing and Monitoring PostgreSQL/EPAS
Auditing and Monitoring PostgreSQL/EPAS
 
Logical Replication in PostgreSQL
Logical Replication in PostgreSQLLogical Replication in PostgreSQL
Logical Replication in PostgreSQL
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
 
PGAnalytics - Facilitando sua vida do DBA
PGAnalytics - Facilitando sua vida do DBAPGAnalytics - Facilitando sua vida do DBA
PGAnalytics - Facilitando sua vida do DBA
 
Servicio y Consumo de Servicios REST en PHP
Servicio y Consumo de Servicios REST en PHPServicio y Consumo de Servicios REST en PHP
Servicio y Consumo de Servicios REST en PHP
 

Viewers also liked

Viewers also liked (20)

What's New in PostgreSQL 9.3
What's New in PostgreSQL 9.3What's New in PostgreSQL 9.3
What's New in PostgreSQL 9.3
 
Maonamassa Pga
Maonamassa PgaMaonamassa Pga
Maonamassa Pga
 
Расширения для PostgreSQL
Расширения для PostgreSQLРасширения для PostgreSQL
Расширения для PostgreSQL
 
(Ab)using 4d Indexing
(Ab)using 4d Indexing(Ab)using 4d Indexing
(Ab)using 4d Indexing
 
Big Data and PostgreSQL
Big Data and PostgreSQLBig Data and PostgreSQL
Big Data and PostgreSQL
 
Migration From Oracle to PostgreSQL
Migration From Oracle to PostgreSQLMigration From Oracle to PostgreSQL
Migration From Oracle to PostgreSQL
 
PostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability Improvements
 
PostgreSQL: Past present Future
PostgreSQL: Past present FuturePostgreSQL: Past present Future
PostgreSQL: Past present Future
 
Swapping Pacemaker Corosync with repmgr
Swapping Pacemaker Corosync with repmgrSwapping Pacemaker Corosync with repmgr
Swapping Pacemaker Corosync with repmgr
 
Lightening Talk - PostgreSQL Worst Practices
Lightening Talk - PostgreSQL Worst PracticesLightening Talk - PostgreSQL Worst Practices
Lightening Talk - PostgreSQL Worst Practices
 
Security Best Practices for your Postgres Deployment
Security Best Practices for your Postgres DeploymentSecurity Best Practices for your Postgres Deployment
Security Best Practices for your Postgres Deployment
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
 
Use Case: PostGIS and Agribotics
Use Case: PostGIS and AgriboticsUse Case: PostGIS and Agribotics
Use Case: PostGIS and Agribotics
 
Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017
 
How to teach an elephant to rock'n'roll
How to teach an elephant to rock'n'rollHow to teach an elephant to rock'n'roll
How to teach an elephant to rock'n'roll
 
PostgreSQL on Amazon RDS
PostgreSQL on Amazon RDSPostgreSQL on Amazon RDS
PostgreSQL on Amazon RDS
 
Why we love pgpool-II and why we hate it!
Why we love pgpool-II and why we hate it!Why we love pgpool-II and why we hate it!
Why we love pgpool-II and why we hate it!
 
Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/Proxy
 
Using the PostgreSQL Extension Ecosystem for Advanced Analytics
Using the PostgreSQL Extension Ecosystem for Advanced AnalyticsUsing the PostgreSQL Extension Ecosystem for Advanced Analytics
Using the PostgreSQL Extension Ecosystem for Advanced Analytics
 

Similar to Useful PostgreSQL Extensions

Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with Kubernetes
Jonathan Katz
 
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
Teresa Giacomini
 

Similar to Useful PostgreSQL Extensions (20)

The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
OSMC 2008 | PostgreSQL Monitoring - Introduction, Internals And Monitoring S...
OSMC 2008 |  PostgreSQL Monitoring - Introduction, Internals And Monitoring S...OSMC 2008 |  PostgreSQL Monitoring - Introduction, Internals And Monitoring S...
OSMC 2008 | PostgreSQL Monitoring - Introduction, Internals And Monitoring S...
 
An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensWhats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
 
Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with Kubernetes
 
When it all GOes right
When it all GOes rightWhen it all GOes right
When it all GOes right
 
What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3
 
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
How to contribute PostgreSQL
How to contribute PostgreSQLHow to contribute PostgreSQL
How to contribute PostgreSQL
 
Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1
 
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORINGEko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
 
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
 
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
 
Eko10 Workshop Opensource Database Auditing
Eko10  Workshop Opensource Database AuditingEko10  Workshop Opensource Database Auditing
Eko10 Workshop Opensource Database Auditing
 
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
 
Managing PostgreSQL with Ansible
 Managing PostgreSQL with Ansible Managing PostgreSQL with Ansible
Managing PostgreSQL with Ansible
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
 

More from 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
 
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
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
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

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Useful PostgreSQL Extensions

  • 1. Useful PostgreSQL Extensions Devrim Gündüz Principal Systems Engineer @ EnterpriseDB devrim.gunduz@EnterpriseDB.com Twitter : @DevrimGunduz © 2013 EnterpriseDB Corporation. All rights reserved. 1
  • 2. Who is this guy? ● Who is this guy? – I have been contributing to PostgreSQL over the last 10 years. – I'm not a hacker, I work on PostgreSQL Community RPMs and website (rarely). – I rarely break RPMs, but (used to) break website more often. – I work at EnterpriseDB right now. – I live in Istanbul, Turkiye. – I have a son. Love Burcu. PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 2
  • 3. Extensions are... not something like this! PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 3
  • 4. Extensions are... not something like this! PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 4
  • 5. The reason is: postgres=# CREATE EXTENSION beer; ERROR: could not open extension control file "/usr/pgsql-9.3/share/extension/beer.control": No such file or directory PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 5
  • 6. So, what are “extensions”? • • 9.1+ feature (They) “make it easier to add and remove plugins, data types, functions etc with minimum fuss and without needing to compile things yourself.” (Simon Riggs) • Formerly “contrib modules” • Some of them are available in PostgreSQL core distribution • There are many extensions available out! PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 6
  • 7. Well-known, in-core extensions There are some extensions that are already available in PostgreSQL core: • hstore (Yay!) • postgres_fdw (YAY!) • unaccent, Intarray, tablefunc, pgcrypto... • pg_buffercache (Yay!) • pg_stat_statements (YAY!) • pg_trgm (Love it) • ... More is available at: http://www.postgresql.org/docs/devel/static/contrib.html PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 7
  • 8. What people say about in-core extensions? PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 8
  • 9. What people say about in-core extensions? PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 9
  • 10. What people say about in-core extensions? PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 10
  • 11. Where are the remaining extensions? ● Pgxn.org ! (YAY) – Remember to use pgxnclient! ● Pgfoundry.org (yay!) ● Github.org (...) ● ... Not a single place to download all extensions... PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 11
  • 12. PostGIS! ● Really an extension? ;) • Spatial database “extender” for PostgreSQL • 2.1 came with great new features: Raster and topology • • Requires fuzzystrmatch extension for tiger_geocoder extension to work. postgis, postgis_topology, postgis_figer_geocoder, PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 12
  • 13. PgRouting (WIN!) ● Extends PostGIS, with routing and network analysis functionality. ● 2.0 is a new-born baby, and comes with great additions. ● Comes with great number of routing algorithms. ● Available in many packaging formats, including RPMs. ● Depends on CGAL and Boost (...) ● http://www.pgrouting.org PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 13
  • 14. PL/proxy • “PL/Proxy is database partitioning system implemented as PL language. Main idea is that proxy function will be created with same signature as remote function to be called, so only destination info needs to be specified inside proxy function body.” • http://pgfoundry.org/projects/plproxy/ • http://wiki.postgresql.org/wiki/PL/Proxy PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 14
  • 15. mongres (yay!) • • • “Mongres is a PostgreSQL extension that runs a custom background worker speaks mongo wire protocol. “ https://github.com/umitanuki/mongres There is no stable release (yet). Feel free to pester @umitanuki (Hiroshi Harada) PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 15
  • 16. What people say about mongres? PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 16
  • 17. ip4r (YAY!) • “ip4 and ip4r are types that contain a single IPv4 address and a range of IPv4 addresses respectively. They can be used as a more flexible, indexable version of the cidr type.” • http://pgfoundry.org/projects/ip4r • v2.0 comes with extension support. • ip6, ip6r, ipaddress, iprange are included in 2.0 release. • RPMs are already available. PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 17
  • 18. pgfincore (YAY!) • “A set of functions to handle low-level management of relations using mincore to explore cache memory.” • http://pgfoundry.org/projects/pgfincore • Depends on no other extensions. • RPMs are already available. PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 18
  • 19. pgfincore (YAY!) postgres=# select * from pgfincore('t1'); -[ RECORD 1 ]-------+-----------------relpath | base/12896/546326 segment |0 os_page_size | 4096 rel_os_pages | 88496 pages_mem | 38371 group_mem | 5197 os_pages_free | 660133 databit | PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 19
  • 20. pgfincore (YAY!) postgres=# select * from pgfadvise_willneed('t1'); -[ RECORD 1 ]----+-----------------relpath | base/12896/546326 os_page_size | 4096 rel_os_pages | 88496 os_pages_free | 583956 PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 20
  • 21. pgfincore (YAY!) postgres=# select * from pgfincore('t1'); -[ RECORD 1 ]--------+-----------------relpath | base/12896/546326 segment |0 os_page_size | 4096 rel_os_pages | 88496 pages_mem | 88496 group_mem |1 os_pages_free | 564335 databit PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 21
  • 22. pg_jobmon • “Job logging and monitoring extension for PostgreSQL” • http://pgxn.org/dist/pg_jobmon • Requires dblink extension • RPMs will be available next week. PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 22
  • 23. pg_partman • “ manage partitioned tables by time or ID (serial)” • Creates triggers, child tables, and check constraints • (Optional) retention policy • RPMs are available PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 23
  • 24. pg_partman partman=# CREATE TABLE test.part_test (col1 serial, col2 text, col3 timestamptz DEFAULT now() NOT NULL); CREATE TABLE partman=# SELECT partman.create_parent('test.part_test', 'col3', 'timestatic', 'daily'); create_parent --------------- (1 row) • partman=# d List of relations • Schema | • PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions Name 24 | Type | Owner
  • 25. pg_partman partman=# d List of relations Schema | Name | Type | Owner --------+-----------------------+----------+---------test | part_test | table test | part_test_col1_seq | postgres | sequence | postgres test | part_test_p2013_10_31 | table | postgres test | part_test_p2013_11_01 | table | postgres test | part_test_p2013_11_02 | table | postgres test | part_test_p2013_11_03 | table | postgres test | part_test_p2013_11_04 | table | postgres test | part_test_p2013_11_05 | table | postgres test | part_test_p2013_11_06 | table | postgres test | part_test_p2013_11_07 | table | postgres test | part_test_p2013_11_08 | table | postgres PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 25
  • 26. E-Maj • • “E-Maj provides a set of functions to 1) log updates performed on groups of tables and 2) rollback these updates if needed” http://pgxn.org/dist/e-maj/ E-maj is used to: - log updates performed on one or several sets of tables. - cancel these updates if needed, and reset a tables set to a predefined stable state. PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 26
  • 27. oracle_fdw • • “oracle_fdw is a PostgreSQL extension that provides a Foreign Data Wrapper for easy and efficient read access to Oracle databases, including pushdown of WHERE conditions and required columns as well as comprehensive EXPLAIN support. http://pgxn.org/dist/oracle_fdw PostgreSQL Conference Europe 2013 Useful PostgreSQL Extensions 27
  • 28. Useful PostgreSQL Extensions Devrim Gündüz Principal Systems Engineer @ EnterpriseDB devrim.gunduz@EnterpriseDB.com Twitter: @DevrimGunduz © 2013 EnterpriseDB Corporation. All rights reserved. 28