Big Bad World of Postgres Dev Environments with Elizabeth Garrett Christensen
Published November 6, 2025
This video features Elizabeth Garrett Christensen at DjangoCon US 2026 in Chicago, Illinois, USA.
This session will cover in detail new features of the software and how they affect your database/Django work. I’ll give some advice on what to take advantage of right away and what to maybe let the other guys try first.
This talk was presented by Elizabeth Christensen at DjangoCon US 2026 in Chicago, Illinois, USA
https://2026.djangocon.us/talks/what-s-new-in-postgres-18-19/
LINKS:
Follow Elizabeth Christensen 👇
On Mastodon: https://fosstodon.org/@sqlliz
Website: https://www.crunchydata.com/blog/author/elizabeth-christensen
Automatically transcribed, so expect mistakes in names and technical terms.
Thank you so much. Happy to be here as always at Django Con. I am Elizabeth Christensen. I do a bunch of volunteer work for the Postgres Association, which is kind of a sister organization where we do very similar things to the Django organizations. I have a table out there with a bunch of Postgres stuff If you want a hat or stickers, come see me after this. And my day job is at Snowflake, and I do a bunch of work on our Snowflake. Postgres thing. I have a very short time up here on stage, but I did feel like I had to say one thing which is that I absolutely love this conference. And if you are an organizer, thank you so much for the time you put into this.
If you're a sponsor or you work for a sponsor, please thank them. And if you're a 10 attendee or a new attendee, I hope you appreciate what an amazing community this is to just be in and learn in. And I always love coming to this. So thank you for having me. We're going to talk about a bunch of Postgres version stuff. If you're new to the world of Postgres versions and you haven't been keeping track, we do a fall release. um every year. Last fall we released Postgres 18. This fall we'll be releasing 19. That's why I did both for this talk because I figured we'll do both. Hopefully you're running on some modern version of Postgres, like ideally a 17 or higher, and then Postgres 14 is kind of end of life.
Postgres 20 is what's being worked on right now. Um, and and you can test and do beta stuff with 19. Most of the stuff that I'm talking about today will make it in. Um but I did have to take some stuff out of my slides because they reverted some features last week. But you know, that happens, I'm sure that happens in Django too. Let me yeah, we're gonna talk through kind of really exciting features that probably developers want to know about. I'm gonna tell you a bunch of stuff that you get for free from just upgrading Postgres. We're going to talk about a couple of management tools and then there's some things, bigger things happening in the world of Postgres I'm going to cover too Probably the biggest feature that you'll want to know about for
Postgres 18 really or 19 for Django work specifically is we did a big upgrade to the UUIDs. If you remember kind of the random UUIDs that we had before, they were just kind of a randomized string, which is great, especially if you're putting, you know, primary keys or IDs in URLs or you're passing them to other systems. They're not great for a database because you can't index them. So there's a UUID standards committee. They kind of came up with a new way to do this so that databases could index UUIDs using this little timestamp saying um and that's the version seven um that we have today. Um I I talked to Paul Paulo
last year, and he's already put this in uh Django, so um think think a Django developer later today. And he has a whole talk tomorrow on UUIDs and then he has a great blog on this topic too. But yeah, you can just put UUIDs straight into your models now and you're ready to go. And then if you are if you're using it as a primary key in Postgres, it'll automatically be indexed. And then if you're maybe using it as a different field, uh you can tell Django to index that column and and you're good to go with the just like a standard B tree. index. I have chatted with a few people about data migration of UUIDs.
I probably wouldn't recommend that because they touch a lot of things in production. You could probably just start. with new UUIDs and over time your data would change. But you know, maybe someone in this room is going to do UUID migration to a new version and and good luck. And I'll see your talk next year There's another um cool feature that Postgres has coming out called virtual generated columns. We talked about this, I think, a little bit last year too. So Postgres for a long time has had virtual columns, which is basically where you're doing something with existing data in the database and you're making a column on the fly. You know, maybe you're you're calculating some kind of sales tax or you're concatenating a name and for whatever reason you actually need that in a column.
And so this just lets you do that without storing the data in a in a separate column. Which is great. Paolo did a great talk on this for the Microsoft Postgres conference called Poset. So if you want to get really deep into the generated columns, look at his YouTube talk on this. You can use the this is what the sequel looks like. You're just basically saying, you know, generate it always as a virtual column. And then I think this talk is an homage to the great Paolo. Um Paulo also I think uh uh was was involved in in making sure that this would be supported in the Django ORM. So you just tell it um the DB persist false and and then you're able to use this.
Alright, so another feature, they're they're doing kind of an interesting little twist. for updates. So when you update a field, it will give you both all of the old things and the new things. This has been a popular feature, like just even with the developers that I work with that do stuff on our systems, because we're always wanting to know like you know new prices or or new things that have happened. This is a cool feature. I don't think this is in Django yet. I saw some threads like when I was kind of searching through your your your discussion thread. So I think there's some ongoing discussion about it So, you know, I don't know. I assume this at some point
will be coming down into the ORM. This is kind of a related uh feature. So, you know, they're kind of always adding things like this. Um, so you can do insert. on conflict, do a select. So you the really common a lot of Postgres stuff you would do, you know, insert if there's a conflict, do nothing, right? So If there's a conflict, skip it and and keep going. But this one will let you just like return the same information back. So if you've you've got a conflict. And you know that row is already there, it'll just give you the row back. Um, and so that's kind of kind of a similar thing just for um making fewer calls to the database to find out what happened.
Yeah, so this is also kind of not supported yet in the Django Orem. I didn't see any discussions, but I assume it's probably related to the other insert discussions. Something to think about. We have to give Paulo something to do at his next at his next sprint. Um There's some cool things that have happened in Postgres 18 with um temporal stuff. Um if you're not familiar with like temporal constraints. Um, you know, you're basically setting things up, you know, in the database so that you cannot ever have overlapping, you know, either a scheduling system where you're doing calendars or, you know, maybe shifts or some kind of hotel room thing. The way that Postgres did this before was just like kind of bizarre
because of the way indexing works in Postgres, you had to kind of make a fake box with a fake span. You had to like It was like so weird and you had to add like little tiny bits of space into it. Um but it worked and you you could actually use um use Postgres like this to to do a temporal table. But it it's weird and and the sequel is kind of odd and and doesn't make a ton of sense. So they basically updated it um to to do a the sequel is here. So you basically do a create table and then You know, you basically say just without overlaps. So what's interesting about this is that to make this feature possible, um, they made a new index type, which is called the B
tree gist And if if you know a little bit about Postgres indexing, B trees are kind of a search tree, and just indexes are usually for spatial data and they handle different data types. So you couldn't You couldn't have a spatial search on a text field or a time field. And so they made this B tree just index so that you could do this kind of this kind of searching And you're basically combining uh combining the B tree and the gist index into one idea to to do this temporal stuff. But I think the way I kind of read it in the Django ORM stuff, and someone can correct me if I read it wrong, I think Django ORM just supports the old methods since that's what people do.
And then I think You know, there's some discussion about maybe updating it just so it maps to the other thing, but it's not a super high priority. The other thing works. It's just kind of weird If you don't know a ton about Postgres constraints and you're you know building out your Postgres empire, adding constraints to your database can be really great. because they could do a lot of things that kind of protect you from your application code. You know, if your bots are writing everything and you want to protect your actual data. um from the thing that's making the application code, you can add constraints to the database, which it can be really nice. I don't know how many of you use window functions. Paulo and I are talking about this yesterday. Uh window functions and Postgres are kind of a way to look across like large pieces of data.
So if you wanted to um you know look at um you know all of my orders from last week and compare those to all of the orders the week before you can kind of create little windows and then Look back through this. Typically used more in analytics, but this had a weird thing where you couldn't um you couldn't use nulls because it would just like mess all the math up. And so they they added some stuff to uh let you just if it would just kind of roll over the ignores and you can just tell it when you build a window function to ignore nulls. Okay, so that's the end of the features. I'll talk a little bit about things that we get just for free by upgrading Postgres. Postgres 18 got um the async. io feature.
Which basically uses some kind of newer um Linux stuff that kind of helps I. O do more things at the same time and work asynchronously. Supposedly, like Postgres says this is like two to three times faster reads. I've talked to some of the people that did a bunch of the benchmarking. I don't know a ton of people. um who've measured this um you know in production with Postgres 18. So if you end up with three times faster reads, let me know. When I've done it, it's it's been a little bit lower than that. um like more in like you know 1. 5 or something. Um but you know it's nice that they're always working on stuff and giving us stuff for free. Postgres had kind of a funky thing.
Um if you're if you're doing indexing and you did multi-column indexing in Postgres If you had like you can you can actually do a lot of columns and multi-column indexes are very cool and a and a very good way to like improve performance, especially when you have things that you're always calling together like first name, last name, email address So if you did all of the columns in order, fine. If you did just the first couple columns, fine. But Postgres wouldn't use your index if you called only the second column or only the second and third column. So they fixed that in Postgres 18 and basically if you have a multi-column index, you can call any of the columns. The feature is called index skip scanning. I don't know why they call it that, but um
the guy that does like the Postgres indexing work is like brilliant. And like I don't understand any of his talks. Like I've been to like five of them and I just like I don't get it. So this is my this is what I did get out of five hours of Postgres indexing on this slide. Um I don't know how many of you are rebuilding indexes all the time, um, but there are quite a few people who have to, you know, they ingest data or they do data loads or they do things like that. And so they've been doing a lot of parallel index rebuilds and trying to make all that faster. So now you can do a parallel GIN index and you can do faster gist indexes if you're using those two. Okay, so I'm going to talk a little bit about some of these features for folks that are maybe like
managing a Postgres database or kind of doing more with their Postgres than they were. So Postgres just got a huge upgrade. And this is probably like, you know, if there's like a headline feature for Postgres 19, this is it. So it's it's like a repacking thing. And if you've ever gone like deep into how Postgres works, um you know, it has like multiversion concurrency. So when you're updating rows of data in Postgres and you update a row or you delete a row or you change anything, it basically has a dead row in that table. And for folks that have really, really high update workloads or high delete workloads, you end up with lots and lots of dead rows that are just like
sitting there. Um and that's where like a Postgres vacuum or the auto vacuum will come in and sort of get rid of the old rows and the old rows have you know transaction IDs and that gets also confusing. But it'll, you know, kind of clean that all up and um you'll have your space back. So if you end up with lots and lots of these dead rows, that's what's called table bloat. This Most modern versions of Postgres ship with auto vacuum usually are fine, but occasionally this does for really high um you know high delete workloads, you will end up with kind of all this crazy extra space and and it's kind of a mess. Um and so what Repack does is it basically lets you just re-packs your tables There were several features that were popular before this.
Like there was something called PG Repack, that's a third-party extension. There's another one called PG Squeeze if you've ever used that. Um and this sort of replaces all of those things. So it kind of does it kind of just basically what happens if you repack a table is it'll You know, you've got your bloated table that's got way too many rows in it, right? You've got, you know, maybe 25% of the rows are active and 75% of the table space is just bloated. It'll take a snapshot of that table um only the live rows, it'll copy that to another table and then it'll use a logical replication kind of inside itself. And it'll replicate all of the writes, all of the reads, everything that's happening to kind of keep that table up
once it's copied over. And then once everything is ready, it just does a swap in a really short lock And then you're kind of done. And what's cool is it'll do it concurrently online. So it's like a no-downtime thing. And if you've ever had to do like repack or squeeze, They're a little dicey and and they're run kind of outside your Postgres. And this is this is a cool tool, especially to help people that are dealing with bloat. Probably not a ton of you, but you know, if it happens, you have a solution now that's like built into Postgres. Um kind of related to this, and we were talking just a second ago about vacuum. Um Postgres has parallelized queries now, so Postgres is kind of working on, you know, like everybody with all the parallel things.
Um, so now they've added parallel vacuum workers. So if you're trying to keep up and trying to get a table vacuumed, you can do that in parallel now. And then Postgres 18 added OAuth 2. 0. Postgres has never had a great story for a single sign-on, so this is a huge step forward for us. You know, this will support stuff like Okta, if you're Key Cloak, if you're like a intra, Azure Intra stuff, which is like the new Active Directory. I just have been working on a bunch of the OAuth integration for Snowflake Postgres and testing all of that. So if you're interested in that, it's really cool. It basically lets you manage
Postgres users from an external an external thing and then you can set up their um you know set up their roles and all of the things that they need in Postgres but you know you're it's it's reducing the role management by quite a bit. And so obviously if you're on a managed service, your service provider has to support this. So I don't know, I don't know where like RDS is on the rollout of this. were kind of just at the beginning of rolling this out on our platform. But I think this will be cool and I think we'll hear a lot about it in the future. Um Postgres passwords for individual users are hashed. You know, like everything long ago, we used like the MD5.
And that's you know phasing out for the um Scram you know 256 stuff. Um if you still if you have a really old Postgres database and people are using passwords that were made like 10 years ago you can you know look in your role table and find the MD5 ones. I think I don't think it's now in Postgres 18 that they won't be able to log in. I think it's like 19, but Like pretty soon people are actually not going to be able to log into Postgres, so they're trying to get everybody off of the MD5 passwords. Postgres also in Postgres 19 just got query plan hints. I just had a long conversation with PG Analyze about this. Um and they're outside and they do some great Postgres work too.
Query plan hints is like a feature that Oracle had if you if you were in Oracle or did did stuff and I think SQL Server has it too. Postgres has never had this. Generally the planner is really good at making query plans Usually if your query plan is broken, it's because you did something wrong and you wrote a bad query or you need an index or something's actually wrong. We were just talking that this is like the most useless feature that no one will ever use because you just don't ever need it. So I I can't come up with a reason why people would need this. Um I don't know. I think this may just be a feature that they added to just like shut the Oracle people up and like just we have it like move on. Like somebody just got tired of fighting, right?
And they're learning compromise and they've been in therapy. Um this is what the query plan hints look like Um you basically add a couple extensions and then you you can pull plans out of of Explain now if you're a big explain person. You can pull those out. And then you basically just feed a plan back into Postgres. Yeah, so I'm going to talk about a couple of things that are happening like in the bigger world of Postgres. One um one thing that is just like seems to be everywhere, and and maybe that's just from my perspective, but it does seem like there's a lot of it is sort of you know people connecting Postgres to you know either analytics databases or like open table formats.
um and and things in in object storage. Um so Snowflake launched uh an open source extension called PG Lake. um where you can read and write um into object storage with Postgres and and talk to Apache Iceberg and Apache Parquet with Postgres. Databricks has a kind of similar idea. They bought a company that had an extension called PG Mooncake , and that's kind of Does some docdb stuff inside Postgres. Um DucDB uh launched an extension called PG DucDB, which lets you run some DuckDB stuff. in Postgres. And then we launched a couple extensions called PG Incremental and that let you kind of do an incremental batch processing so that if you're you're moving stuff to perquet
I think this is like just kind of a sign of the times in Postgres right now is that people are ready to like integrate Postgres with the wider world of object storage and now we have a lot of options to do it The other thing that's kind of been interesting in the last year is graph queries. I I heard a lot about graph databases. That was a thing. Like it seemed really popular like five years ago, but I was doing Postgres stuff, so I was kind of not following that. Um, but there's a lot of interest now in doing graph things inside Postgres. Um and so Postgres 19 is kind of getting baby graph queries, like just sort of the beginning of it. Graph queries
are probably not the most useful thing to a Django person if you're only doing application development. But if you're doing analytics and and you need to write SQL or or pull more complex data out, I think that's where you're gonna see it. And it if you've ever had to get through like really deeply nested relationships like um you know, like a an org chart at a at a company or you know, parent-child relationships where everything's nested and you can write CTEs and Postgres to do this, but it's messy and it and it's not as easy. So They're kind of moving towards letting people use graphs. There's another extension in Postgres that does this too called Apache Age.
And it does kind of what the new graph feature does, but with a little bit more. And I and I've really only done a lot of testing on Apache Age. Um and so it's basically like it's like kind of tied in a little bit to this world of of the object storage where you've got lots and lots of data and you maybe have like patient data that came from somewhere and all this different stuff and you need to like there's complex relationships between all of the things and and but you still want to get the data out with SQL. So that's kind of what graph queries are. But yeah, I'll just wrap this up and take a couple. Oh, I have no time. I will be outside if you want to come chat about Postgres
and come get a hat from me. Postgres 18 is that now. Um it'd be a great idea to upgrade every Postgres, you know, I covered some high-level features, but every Postgres version comes with like thousands and thousands of commits. to make the query planner better, to make things faster. So, you know, I gave you the highlights, but there are um good improvements in every version. If you want to beta test Postgres 19 Um and yeah, we're excited about all the stuff that Postgres can do. Thank you.
August 24 - 28, 2026
Chicago, Illinois, USA
Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.
Published November 6, 2025
Published December 6, 2024
Published December 15, 2023
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026