
Published on August 12, 2025 by Stefanie Janine Stölting
PostgreSQL postgres extensions extension foreign data wrapper fdw PGXN
10 min READ
People starting with PostgreSQL learn very fast about the possibilities to extend it’s capatibilities and behavior with extensions.
PostgreSQL itself has a contrib module containing several extensions. These extensions can be installed with the CREATE EXTENSION command.
Most extensions outside the contrib module might need a bit more time, until they support new major versions. Keep that in mind when using them and check their availability before you upgrade your instance.
Other extensions need additional packages and to be compiled with C, C++ or Rust. Others need a runtime environment because they are based on Perl or Python.
There are some problems coming up nowadays, because companies tent to use PostgreSQL as a service (SaS), or having it running inside Kubernetes. Both approaches usually have the problem of a lesser support of extensions, only those offered by the vendor of the SaS solution, or the publisher of the Kubernetes operator only offers a some of the very well known extensions.
And obviously they don’t allow their users to compile extensions themself.
You can read more about supported extensions in my recent post, where I compared some Kubernetes operators.
As mentioned, the companies that offer managed cloud PostgreSQL instances do not allow their customers, to install extensions of their own choice.
Each cloud provider has his own list of supported extensions. When you need some, you can compare the providers and check which extension they support on https://www.pgextensions.org/.
Currently I am participating in the development of three extensions.
The one that I am managing is pgsql_tweaks, where I published views and functions, that are not part of PostgreSQL, but have been and still helping me in my daily work.
The other two are foreign data wrappers, cassandra2_fdw and sparql_fdw.
PostgreSQL has some extensions in its core system, meaning they are always available, except when your PostgreSQL instance is running in the cloud.
The complete list is in the PostgreSQL documentation.
This extension offers statistics over executed queries like how often, the fastest and the slowes execution. The extension is availabe on all cloud platforms.
The extensions does not only log slow queries, it adds the execution plan of the query to the logs. The extension is availabe on all cloud platforms except Neon.
This one helps to get detailed information about the current state of a table. The extension is availabe on all cloud platforms except YugaByte.
There are several extensions adding additional data types to PostgreSQL. Most of them are not availabe on any cloud platform.
Implements unsigned integer data data type into PostgreSQL, people coming from MySQl/MariaDB often miss this type in PostgreSQL. The extension is not availabe at cloud providers.
It implements a data type for hierachical tree structures. In addition of the support of several PostgreSQL indexes like B-Tree, Hash, and GiST, it adds another index type, path_gist_idx. The data type is a PostgreSQL contrib module. It is availabe on all cloud platforms except YugaByte.
This is extension support for geographic objects. It does even have its own Wikipedia page. Whenever you need to handle geographic data, you will need PostGIS, it adds data types, indexes, and funcions. It is availabe on all cloud providers except YugaByte.
PostgreSQL does already support several index types, more than most other RDBMS. But there are more availabe as extensions.
This index type is based on GIN and is useful for fulltext search without tsvector and tsquery. It is only availabe in the cloud of Neon.
Implements an index based on Bloom filters and is a PostgreSQL contrib module. It is availabe on all cloud providers except YugaByte.
Implements creation, maintenance, and use of time series tables. It is only availabe on any cloud.
This is a high performance real-time analytics on time series data with maintenance of time series tables. It is availabe on the cloud platforms of Aiven, Microsoft Azure, Neon, Tiger Cloud (former Timescale), and Crunchy Data.
There are some monitoring extensions availabe, that might help to get more insights into what is going on and that are not part of PostgreSQL itself or the PostgreSQL Contrib.
This one gathers statistics about reads and writes by the filesystem and does need pg_stat_statements to be installed. It not available on any cloud.
It is a query performance monitoring tool based on pg_stat_statements. It is availabe on the cloud platforms of Aiven and YugaByte.
This one is a UNIX top like command line monitoring tool.
Keeping an eye on configuration changes is the goal of this extension. It is not available on any cloud.
This extension is needed to gather statistics to be used by PoWA, a PostgreSQL workload analyzer. It is not available on any cloud.
With the concept of Foreign Data Wrappers PostgreSQL has implemented a way to access data not stored inside a PostgreSQL database on the same server.
Some foreign data wrappers have implemented not only reading external data, but also writing into external servers.
A list can be found at the PostgreSQL Wiki.
In fact, there is nearly no data source, that cannot be accessed from within PostgreSQL transparently with SQL statements.
Some foreign data wrappers are also availabe at cloud providers. Only Tiger Cloud (former Timescale) and Neon do not support foreign data wrappers at all.
But a fun fact is, that you can access the databases in Tiger Cloud and Neon from all other cloud providers with the postgres_fdw. Not to mention that you can access all cloud providers databases with a bare metal PostgreSQL installation, even when they are not PostgreSQL.
Most Kubernetes PostgreSQL operators support a lot of foreign data wrappers.
Multicorn2 is a PostgreSQL extnesion meant to easy development of Foreign Data Wrappers build in Python. But it comes with several options to just read some sources without the needs to develop a FDW, for example to access RSS Web Feeds. Multicorn2 is not available on any cloud.
By default PostgreSQL supports PL/pgSQL to write functions, procedures, and trigger functions. PL/pgSQL is supported by all cloud providers except YugaByte.
But there are more programming languages availabe as extensions.
It implements the Java™ for functions, procedures, and trigger functions. It is not available on any cloud.
It implements the R as programming language. The language is widely adopted in fields of data mining, bioinformatics, data analysis, and data sience. The extension is only availabe on cloud of Crunchy Data.
The extension implements data anonymization transparently per role. It is not available on any cloud.
Implements cryptographic functions and is a contrib extension. It is availabe on all cloud platforms.
This encryption library is using the libsodium library. It can automatically encrypt and decrypt one or more columns of data in a table. It is not available on any cloud.
Some of these extensions are availabe at some cloud providers.
pg_cron gives the opportunity to have cron jobs handled and managed inside of PostgreSQL, for example cheduling database jobs to import or export data, refreshing materialized views automatically. It is availabe on Amazon Web Services, Aiven, Google Cloud, Microsoft Azure, and Crunchy Data.
PostgreSQL does support the UUID data type, but it does not have functions to generate UUIDs by default. This is where this extension comes in, as it is a contrib extension, it is availabe on all cloud platforms.
This extensions enables background jobs sort of alike to Oracles autonomous transactions. Autonomous transactions are regularly used in Oracle functions and procedures and they are often missed when migrating to PostgreSQL.
When this extension is not availabe the only other chance to implement something alike is to use dblink.
This extension is only availabe on Google Cloud.
With this extension you can open connections to another database or on another server. It does even work inside a procedure or function. But most times it is much more handy to use a Foreign Data Wrappers.
dblink is availabe on all clouds except Neon, Tiger Cloud (former Timescale), and YugaByte.
This extension is extremely helpful with bigger data and therefore some RAM. It stores the caches to disk on shutdown and loads them from disk into RAM after start.
pg_prewarm is availabe on all clouds except Tiger Cloud (former Timescale), and YugaByte.
This extension provides session and/or object audit logging via the PostgreSQL standard logging facility.
pgaudit is availabe on all clouds except Neon.
The PostgreSQL Extension Network, short PGXN, is a tool and website handling PostgreSQL extensions. There are lots of extensions in different categories availabe, from foreign data wrappers to additional index methods.
Obviously this is not availabe on any cloud.
To use PGXN to install extensions you need the pgxnclient.
On Debian based systems it is:
sudo apt install pgxnclient
After the installation of the PGXN client packages can be installed just with:
sudo pgxnclient install pgsql_tweaks
That would install the pgsql_tweaks extension.
Afterwards the extension has to be createed inside the database:
CREATE EXTENSION pgsql_tweaks;
There are lot of helpful extensions for lots of purposes. Some have to be installed manually, but even that can be automated with Ansible.
But there are also extensions out in the wild, that did not get any support for ages. Try to avoid these extensions as they might not work after major upgrades. Check at least the repositories.
This is only possible for self hosted PostgreSQL instances. When you choose to use managed clouds, you get stripped of a lot of possibilities.
Comprare at least the availabe extensions to be sure, the ones you might need are supported by the cloud provider of your choice.
The same goes for Kubernetes operators, add to check extensions availability to the list of neccessary checks.
On September 08, 2025, I removed all mentions of the Tembo cloud, as they have chosen to close ther cloud services.
This results in several great extensions, that are now not available in any cloud. If your really have use a cloud provider for database hosting, keep in mind,that is your data on other peoples servers. Therefore choose wisely, as otherwise you might miss needed features, or forced into developing workarounds.

Author: Stefanie Janine Stölting