---
title: "Postgres 12 is here"
publication: "Postgres Weekly"
issue: 326
published_at: "2019-10-09"
canonical_url: "https://postgresweekly.com/issues/326"
---

The latest Postgres news, articles, tools, and projects, plus a roundup of what's new in Postgres 12.       

#326 — October 9, 2019 

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

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1570535120/f7ksfjt0klgx0oyoom09.jpg)](https://www.postgresql.org/about/news/1976/)  

[PostgreSQL 12 Released](https://www.postgresql.org/about/news/1976/) — Just a year on from Postgres 11 comes version 12, another strong step forward for our favorite database. Key enhancements include SQL/JSON support, [generated columns](https://www.postgresql.org/docs/12/ddl-generated-columns.html), and significant performance improvements (particularly with indexes and partitioned tables). 

PostgreSQL Global Development Group   

[A Look at Generated Columns in Postgres 12](https://pgdash.io/blog/postgres-12-generated-columns.html) — _“A generated column is sort of like a view, but for columns.”_ There are a few limitations, but essentially you can define columns that are based upon other columns. There’s a neat full text search example shown off here. 

RapidLoop   [![\](https://copm.s3.amazonaws.com/a0b22637.png)](https://resources.2ndquadrant.com/postgresql-partitioning-webinar) 

[Free Webinar: Learn PostgreSQL Partitioning with Simon Riggs](https://resources.2ndquadrant.com/postgresql-partitioning-webinar) — Get an overview of PostgreSQL partitioning features & how they play a key role in performance improvements of very large databases. Learn recent improvements to partitioning and parallelism, explore specific use cases, and explore upcoming features. 

2ndQuadrant PostgreSQL Webinars sponsor      

🐘**Postgres 12 Roundup** 

Over the past few months we've linked to a variety of posts covering new Postgres 12 features. Here's a recap: 

- Bruce Momijan has [this splendid PDF](https://momjian.us/main/writings/pgsql/features.pdf) packed with coverage of Postgres 12's major new features.
- Merely upgrading to Postgres 12 will [improve performance](https://info.crunchydata.com/blog/just-upgrade-how-postgresql-12-can-improve-your-performance) without doing anything else.
- [Partitioning is now faster.](https://www.2ndquadrant.com/en/blog/postgresql-12-partitioning/)
- [Vacuuming has improved.](https://www.2ndquadrant.com/en/blog/pg-phriday-postgres-12-revs-up-vacuum/)
- So [has partitioning!](https://www.2ndquadrant.com/en/blog/partitioning-enhancements-in-postgresql-12/)
- What about [COPY and bulk loading improvements](https://www.cybertec-postgresql.com/en/tech-preview-improving-copy-and-bulkloading-in-postgresql-12/) too?
- Here are [some approaches you can use to upgrade](https://www.cybertec-postgresql.com/en/a-primer-on-postgresql-upgrade-methods/) Postgres versions.
- A [comparison of SQL/JSON](https://thombrown.blogspot.com/2019/07/jsquery-vs-sqljson.html) (now supported in 12) versus jsquery.
- Here's a little look at [SQL/JSON paths.](https://paquier.xyz/postgresql-2/postgres-12-jsonpath/)     

[Trace Query Processing Internals with a Debugger](https://www.highgo.ca/2019/10/03/trace-query-processing-internals-with-debugger/) — Wow, this is some serious query debugging. I have no urge to dig _this_ deep into Postgres, but it’s handy to know how if you do. 

Cary Huang   

[Crunchy High-Availability PostgreSQL Keeps Critical Applications Up](https://www.crunchydata.com/products/crunchy-postgresql-high-availability-suite/?utm_source=PostgresWeekly&utm_medium=Newsletter&utm_campaign=CrunchyHA) — Leverage trusted open source software to ensure your PostgreSQL data is always available. 

Crunchy Data sponsor   

[Replication Configuration Changes in PostgreSQL 12](https://www.2ndquadrant.com/en/blog/replication-configuration-changes-in-postgresql-12/) — Till now, replication configuration settings have been stored in a special file, `recovery.conf`, but in Postgres 12 the settings have been converted to normal Postgres config settings and so can now be managed in `postgresql.conf` or with `ALTER SYSTEM`, etc. 

Ian Barwick   

[PostGIS 3.0.0 Release Candidate 1](http://postgis.net/2019/10/08/postgis-3.0.0rc1/) — We linked to the beta last week, now the popular geospatial data extension for Postgres is already at RC1 with final release just around the corner. 

PostGIS Developers       supported by [![PGX\](https://copm.s3.amazonaws.com/4f40a0e3.png)](https://pgexperts.com/)  

💡**Tip of the Week** 

Shortcuts / variables for your queries in `psql` 

If you're spending some serious time in `psql` coming up with queries, doing some optimization, or otherwise working on your database, you might find yourself typing the same things over and over, such as putting `EXPLAIN ANALYZE` before your queries in order to look at their query plans. Rather than typing this out each time, `psql` lets you define 'variables' which you can use as shortcuts in your queries. 

Here's an example using `EXPLAIN ANALYZE` in particular:  

\set ea 'EXPLAIN ANALYZE'   

This sets a variable called `ea` to `EXPLAIN ANALYZE` and it can be used as simply as this:  

:ea SELECT * FROM _[...rest of query here]_   

It's certainly a lot easier to prefix a query with `:ea` than `SELECT ANALYZE`. You can also add these to a `.psqlrc` file if you want them to be defined each time you use `psql`. [More on that here.](http://pavdmyt.com/better-postgresql-cli-experience-with-psqlrc-tweaks/) 

This week's tip of the week is sponsored by [PostgreSQL Experts, Inc](https://pgexperts.com/): Your data is your business; let us help you build, troubleshoot, and scale your PostgreSQL data systems.      

🗓**Upcoming Events** 

- [pgDay Santiago](https://www.pgday.cl/2019/) (October 29 in Santiago, Chile) — pgDay Santiago is intended for PostgreSQL users of all levels, with talks for everyone and the chance to meet with your peers.
- [PG Down Under 2019](https://pgdu.org/) (November 15 in Sydney, Australia) — The second outing for this annual, Australian Postgres conference. The CFP remains open till next week.
- [PgConf.Russia 2020](https://pgconf.ru/2020) (Febuary 3-5 2020 in Moscow, Russia) — One day of tutorials and two days of talks in three parallel sessions.
- [PGConf India 2020](https://pgconf.in/conferences/pgconfin2020) (Febuary 26-28 2020 in Bengaluru, Maharashtra, India) — This year there is a dedicated training day and a multi-track 2-day conference.          

Curated by [Cooperpress](https://cooperpress.com/), [Peter Cooper](https://twitter.com/peterc), 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
