---
title: "Pluggable table storage coming to Postgres?"
publication: "Postgres Weekly"
issue: 301
published_at: "2019-04-17"
canonical_url: "https://postgresweekly.com/issues/301"
---

The latest Postgres news, articles, tools, and projects.       

#301 — April 17, 2019 

[Read on the Web](https://postgresweekly.com/issues/301)   

Postgres Weekly Latest Release: [11.2](https://www.postgresql.org/about/news/1920/) (2019-02-14)   

['Postgres Now Has Pluggable Table Storage'](https://twitter.com/AndresFreundTec/status/1113948321976946689) — Well, core does, we’ll need to wait a while to be using this in production, but being able to more easily switch in table storage systems will open up interesting opportunities. 

Andres Freund on Twitter   

[Writing PostgreSQL Extensions in C is Fun](https://www.percona.com/blog/2019/04/05/writing-postgresql-extensions-is-fun-c-language/) — It depends on your definition of _fun_ but it’s not _quite_ as difficult as I’d assumed. This post walks through the basic steps to get started. I also think reading the code of simple, but complete, extensions such as [count_distinct](https://github.com/tvondra/count_distinct/blob/master/src/count_distinct.c) is useful if you wish to pursue this. 

Ibrar Ahmed   [![\](https://copm.s3.amazonaws.com/9a6f3274.png)](https://resources.2ndquadrant.com/security-and-compliance-with-postgresql) 

[Learn to Secure Your Database](https://resources.2ndquadrant.com/security-and-compliance-with-postgresql) — Join the free PostgreSQL webinar: Security and Compliance with PostgreSQL and learn to identify and secure your database breach points. [Reserve your spot today](https://resources.2ndquadrant.com/security-and-compliance-with-postgresql). 

2ndQuadrant PostgreSQL Webinars sponsor   

[When Postgres Blocks: 7 Tips for Dealing with Locks](https://www.citusdata.com/blog/2018/02/22/seven-tips-for-dealing-with-postgres-locks/) — We’re revisiting a classic post that highlighted common mistakes developers face dealing with Postgres locks and what you can do about them. 

Marco Slot   

[Postgres 12 is Optimizing the Storage of Small Tables](https://blog.2ndquadrant.com/optimizing-storage-small-tables-postgresql-12/) — One to read if your database model requires that you have a large number of small tables (e.g. a multi-tenant schema). Things will be getting more efficient in Postgres 12. 

John Naylor   

[Swarm64 Supports Xilinx Alveo Accelerator](https://swarm64.com/press-release/swarm64-supports-xilinx-alveo/) — At the risk of sounding like a pile of buzzwords and trademarks, this is a press release for [an FPGA-based database _accelerator_](https://swarm64.com/productsolution/) that supports Postgres. 

Swarm64   

[Fast Upgrading of Legacy Postgres with Minimum Downtime Using `pg_upgrade`](https://www.percona.com/blog/2019/04/12/fast-upgrade-of-legacy-postgresql-with-minimum-downtime-using-pg_upgrade/) — The latest in a long series of Postgres upgrading posts from Percona. This time [pg_upgrade](https://www.postgresql.org/docs/11/pgupgrade.html) (formerly pg_migrator) is considered. 

Avinash Vallarapu   

[Getting Started with Azure Database for PostgreSQL](https://docs.microsoft.com/en-us/azure/postgresql/?ocid=orcas_pw_pgs) — A fully managed Postgres database engine with features like built-in high availability, scalability, and security. Get started and leverage the open source tools of your choice. 

Microsoft Azure sponsor   

[A Postgres 12 Highlight: `pg_checksums`](https://paquier.xyz/postgresql-2/postgres-12-pg-checksums/) — A renaming of `pg_verify_checksums` as introduced in Postgres 11. 

Michael Paquier   

[pspg: An Alternative Pager for Postgres's psql Client](https://github.com/okbob/pspg) — Replaces `less` and brings in support for tabular data. 

Pavel Stehule   

[Marten: Postgres-Based Persistence for .NET Systems](http://jasperfx.github.io/marten/) — A document database and event store for .NET-based apps that uses Postgres to do the heavy lifting on the backend. And, yes, it works on .NET Core :-) 

JasperFx   

[libpqxx: The Official C++ Client API for Postgres](https://github.com/jtv/libpqxx) — It’s had quite a few updates recently. 

Jeroen Vermeulen       supported by [![Percona\](https://res.cloudinary.com/cpress/image/upload/v1555414820/quibw7mz2rmij9dqj4nw.png)](https://www.percona.com/resources/webinars/upgrading-migrating-your-legacy-postgresql-newer-postgresql-versions)  

💡 Tip of the Week 

Automatically logging slow queries 

The server that hosts our newsletter was running slow and we didn't know why. Postgres was suffering in particular, so we wanted to see what queries were getting bogged down. 

Like most databases, Postgres has a built-in **slow query log** feature that automatically logs queries to the main Postgres log file if they take over a certain amount of time and it's really easy to set up. 

In your main `postgresql.conf` file (which is often somewhere like `/etc/postgresql/9.6/main/postgresql.conf`), either edit or add a line like so:  

log_min_duration_statement = 1000   

After restarting Postgres or reloading the config with `SELECT pg_reload_conf();`, this directive causes any queries that take over 1000 _milliseconds_ (one second) to be logged. 

(The location of the log file varies but is `/var/log/postgresql/postgresql-9.6-main.log` on my test setup, for instance.) 

To deliberately run a long query for testing purposes:  

select pg_sleep(10) /* just testing */;   

Note the presence of the comment within the query, that'll appear in the log too so that anyone else monitoring will be aware of what's going on. 

And, no, it wasn't Postgres causing our performance issues. Our VPS was on a shared box that came under heavy use and upgrading our instance fixed it. I'll note, though, that if you run any VPS style servers, it's well worth being familiar with ['steal time' and how to monitor it!](https://scoutapm.com/blog/understanding-cpu-steal-time-when-should-you-be-worried) 

This week's tip is sponsored by _[Percona](https://www.percona.com/resources/webinars/upgrading-migrating-your-legacy-postgresql-newer-postgresql-versions)_. Join Percona as we present [Upgrading / Migrating your legacy PostgreSQL to newer PostgreSQL versions](https://www.percona.com/resources/webinars/upgrading-migrating-your-legacy-postgresql-newer-postgresql-versions).      

🗓 **Upcoming Postgres Events** 

- [pgconf.de 2019 (May 10 in Leipzig, Germany)](https://2019.pgconf.de/) — The latest edition of the highly successful German-speaking PostgreSQL conference.
- [PGDay.IT 2019 (May 16-17 in Bologna, Italy)](https://2019.pgday.it/en/)
- [PGCon 2019 (May 28-31 in Ottawa, Canada)](https://www.pgcon.org/2019/) — An annual conference for users and developers to meet and discuss all things Postgres.
- [Postgres Vision 2019 (June 24-26 in Boston, MA)](https://postgresvision.com/)          

Curated by [Cooperpress](https://cooperpress.com/) and [Craig Kerstiens](https://twitter.com/craigkerstiens). 

[Change your email address](https://postgresweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://postgresweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
