---
title: "Amazon RDS for Postgres can now call Lambda functions"
publication: "Postgres Weekly"
issue: 402
published_at: "2021-04-21"
canonical_url: "https://postgresweekly.com/issues/402"
---

Plus a way to use Postgres as easily as SQLite. |        

#​402 — April 21, 2021 

[Web Version](https://postgresweekly.com/issues/402)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/ja18sroyeztdigdyrost.jpg)](https://blog.crunchydata.com/blog/postgres-is-out-of-disk-and-how-to-recover-the-dos-and-donts)  

[When Postgres is 'Out of Disk': How to Recover with Some Dos and Don'ts](https://blog.crunchydata.com/blog/postgres-is-out-of-disk-and-how-to-recover-the-dos-and-donts) — I ran into this situation myself recently on RDS _(Protip: set up alerts for this eventuality ;-))._ Several CrunchyData engineers share some useful tips here with things to do or not do when you enter panic mode. 

E Christensen, D Christensen, Katz, and Frost   

[Amazon RDS for PostgreSQL Now Integrates with AWS Lambda](https://aws.amazon.com/about-aws/whats-new/2021/04/amazon-rds-postgresql-integrates-aws-lambda/) — I still need to fully get my head around this one, but being able to invoke serverless _Lambda_ functions from within Postgres stored procedures or user-defined functions seems like it has some _huge_ potential. 

Amazon Web Services, Inc.   [![\](https://copm.s3.amazonaws.com/a2b432a8.png)](https://www.postgresvision.com/?utm_source=postgres-weekly&utm_medium=newsletter&utm_campaign=PGV2021) 

[Postgres Vision 2021 - Free Online Conference (June 22-23)](https://www.postgresvision.com/?utm_source=postgres-weekly&utm_medium=newsletter&utm_campaign=PGV2021) — This free, virtual, global event brings together the world’s leading PostgreSQL experts, users, and community members. Presentations will explore real-world user stories and new technologies, all moving forward with PostgreSQL. 

EDB sponsor     

Quick Bits 

- Microsoft has unveiled a [new 'Basic' tier for Hyperscale (Citus)](https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/sharding-postgres-with-basic-tier-in-hyperscale-citus-how-why/ba-p/2275672), making it cheaper to run managed Citus on Azure than before.
- Not Postgres-specific, but [an interesting talk about graph databases](https://www.youtube.com/watch?v=OKDwoc_nk_A) and where they make sense. The recent release of [Apache AGE](https://age.apache.org/), a graph extension for Postgres, has got me thinking about this area a little more lately.   

[Lessons Learned From Five Years of Scaling PostgreSQL](https://onesignal.com/blog/lessons-learned-from-5-years-of-scaling-postgresql/) — _“Over the years, we’ve scaled up to 75 terabyte (TB) of stored data across nearly 40 servers.”_ It’s always fascinating to read about people’s experiences, particularly with a deployment like this. 

Joe Wilm   

[PostgreSQLite: A Way to Use Postgres 'Like SQLite'](https://github.com/fdietze/postgresqlite) — A neat little idea that’s orchestrated by a straightforward [30-line shell script.](https://github.com/fdietze/postgresqlite/blob/master/postgresqlite) Docker does most of the heavy lifting, though. 

Felix Dietze   

[Three Approaches to Connection Management in Postgres](https://blog.crunchydata.com/blog/your-guide-to-connection-management-in-postgres) — Connection pooling and management is one of those areas most people ignore far too long when it comes to their database. Craig quickly looks at three approaches to consider as you scale up. 

Craig Kerstiens   

[Benchmarking Postgres: Setting up a RAID Array from Scratch](https://www.enterprisedb.com/blog/benchmarking-postgresql-setting-raid-array-scratch) — It’s been a long time since I’ve sat down and set up my own RAID array (‘the cloud’ has a lot to answer for!) 

Vik Fearing   

[Visualize All Your PostgreSQL Performance Metrics in Real-Time](https://www.datadoghq.com/dg/monitor/postgresql-benefits/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-PostgresWeeklyBenefitsS) — Collect OOTB and custom metrics for real-time performance analysis in Datadog. Start a free Datadog trial. 

Datadog sponsor   

▶[Citus Talk at CMU: Distributed Postgres as an Extension](https://www.citusdata.com/blog/2021/04/10/talk-at-cmu-how-citus-distributes-postgresql-via-extension-apis/) — Marco recently gave an interesting talk about Citus, the horizontal scaling Postgres extension, as part of a Carnegie Mellon database tech series and [the video](https://www.youtube.com/watch?v=X-aAgXJZRqM) is now available. A good, accessible overview. 

Marco Slot   

[The Power of `synchronous_commit`](https://momjian.us/main/blogs/pgblog/2021.html#April_14_2021) — _“`synchronous_commit` is one of the settings that isn’t simple and controls perhaps too many things..”_ As well as rewriting the documentation for the feature, Bruce has outlined the essence of what it does here. 

Bruce Momjian   

[`pspg` 4.6.0 Released](http://okbob.blogspot.com/2021/04/pspg-460-released.html) — `pspg` is a ‘pager’ tool for working with table data from Postgres (though MySQL is now supported too). 4.6 adds a new query stream mode for using `pspg` from text editors. [GitHub repo](https://github.com/okbob/pspg). 

Pavel Stěhule      supported by [![CYBERTEC\](https://res.cloudinary.com/cpress/image/upload/v1618830466/ynniwgesklauqe9qwpuz.png)](https://www.cybertec-postgresql.com/)  

💡**Tip of the Week** 

Ordering columns for better performance 

To reduce the storage footprint of your database make sure that you order columns wisely. It's generally a good idea to put fixed size columns first and add variable length columns later. 

Instead of:  

CREATE TABLE t_foo (
 c varchar(100),
 a int,
 d varchar(100),
 b int
 );   

...rather go for:  

CREATE TABLE t_foo (
 a int,
 b int,
 c varchar(100),
 d varchar(100)
 );   

It will reduce the size of your table and thus speed up your database. The reason for this behavior has to do with CPU alignment. 

To learn more about columns and their impact on PostgreSQL performance, check out our blog post “[Shrinking the Storage Footprint of Data](https://www.cybertec-postgresql.com/en/shrinking-the-storage-footprint-of-data/)”. 

This tip of the week is brought to you by [CYBERTEC](https://www.cybertec-postgresql.com/), your professional partner for PostgreSQL and Data Science since 2000. [Read more](https://www.cybertec-postgresql.com/en/?s=postgresql+performance) about PostgreSQL Performance in CYBERTEC’s blog.     

**Got a new email?** You can [change your address here](https://postgresweekly.com/edit_subscription/*|UID|*). 

--- 

**Bored of us?** [Click here to stop getting Postgres Weekly](https://postgresweekly.com/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. Thanks! 

--- 

**Want more?** You might like [DB Weekly](https://dbweekly.com/?utm_source=pg&utm_medium=email&utm_campaign=footer-promo), our more general database newsletter covering data storage trends, new database types, and more. 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada. 

[Stop getting this newsletter.](https://postgresweekly.com/leave/*|UID|*)
