---
title: "To thread, or not to thread? It's a huge question"
publication: "Postgres Weekly"
issue: 510
published_at: "2023-06-14"
canonical_url: "https://postgresweekly.com/issues/510"
---

Plus a handy pgBadger feature, and how much CodeSandbox depends on Postgres. |        

#​510 — June 14, 2023 

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

Together with [![pgAnalyze\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_350,h_100/e_make_transparent/co_white,e_outline:7/lhwcvgc1asd4fzaahty4.png)](https://pganalyze.com/?utm_source=PostgresWeeklyPrimary06142023)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/htsul5ill9p11ca5ef3y.jpg)](https://www.postgresql.org/message-id/flat/31cc6df9-53fe-3cd9-af5b-ac0d801163f4%40iki.fi)  

🗣 [Let's Make Postgres Multi-Threaded?](https://www.postgresql.org/message-id/flat/31cc6df9-53fe-3cd9-af5b-ac0d801163f4%40iki.fi) — Inspired by some conversations at PGCon, Postgres contributor Heikki Linnakangas is excited about the idea of taking Postgres from a multi-process world to one with a _single_ process using multiple threads. Don’t get excited yet; it'll be a huge undertaking, if it happens. The response was mixed: Tom Lane [predicts disaster](https://www.postgresql.org/message-id/4178104.1685978307%40sss.pgh.pa.us), though Robert Haas is [in support](https://www.postgresql.org/message-id/CA%2BTgmoaQRwmsFxNYF3QAtu4W9XpONpuBm8FZeY%2BhvMvrocqYYA%40mail.gmail.com), but thinks a process-based model may need to remain an option for a long time to come. 

Heikki Linnakangas   [![\](https://copm.s3.amazonaws.com/543de27c.png)](https://pganalyze.com/?utm_source=PostgresWeeklyPrimary06142023) 

[Postgres Performance at Any Scale](https://pganalyze.com/?utm_source=PostgresWeeklyPrimary06142023) — Deliver consistent database performance and availability through intelligent tuning advisors and continuous database profiling. Take control of your Postgres workload and query plans and empower **all** development teams to fix slow queries. Try pganalyze today! 

pganalyze sponsor   

[Remotely Loading Google Sheets Data into Postgres](https://www.crunchydata.com/blog/holy-sheet-remote-access-csv-files-from-postgres) — Getting data out of Google Sheets in CSV format is pretty easy, but what about getting that CSV into a Postgres database? There are a few options from `COPY` to pulling in data directly over HTTP (with an extension), an FDW, or even spinning up some PL/Python to do the job. 

Paul Ramsey   

**IN BRIEF:** 

- 📅 The [PASS Data Community Summit](https://passdatacommunitysummit.com/) is a large in-person conference commonly associated with the SQL Server community, but Postgres can no longer be ignored(!) and [gets its own track/'learning pathway'](https://passdatacommunitysummit.com/sessions/learning-pathways/#postgresql) this year. It's in Seattle, WA this November and Bruce Momjian, Ryan Booz, and others will be there.
- Pavlo Golub reflects on [his recent experiences at PgDay Belgium](https://www.cybertec-postgresql.com/en/pgday-belgium-2023-reflections/).
- Ashutosh Bapat shares some pointers on [using VS Code for Postgres internals development](https://ashutoshpg.blogspot.com/2023/06/postgresql-internals-development-with.html).   

[Building Hypothetical Indexes in Amazon RDS with HypoPG](https://aws.amazon.com/blogs/database/build-hypothetical-indexes-in-amazon-rds-for-postgresql-with-hypopg/) — [HypoPG](https://github.com/HypoPG/hypopg) is an interesting extension for Postgres that lets you pretend that certain indexes exist when they don’t in order to see whether or not Postgres would use them. This tutorial targets RDS but the idea can be used anywhere. 

Peter Celentano   

[Migrating SQL Server Databases to Babelfish for Aurora PostgreSQL](https://aws.amazon.com/blogs/database/migrate-your-sql-server-database-to-babelfish-for-aurora-postgresql-using-the-bulk-copy-program-utility/) — _Babelfish for Aurora PostgreSQL_ includes support for both T-SQL and the SQL Server wire-protocol so it's possible to migrate a SQL Server database to Babelfish using AWS’s ‘Bulk Copy Program’ utility. 

Fernandes, Valentim, and Carvalho Queiroz (AWS)   

[Three Ways to Plot Incremental Materialized Views](https://www.timescale.com/blog/3-ways-to-plot-incremental-materialized-views-a-k-a-continuous-aggregates/) 
David Bailey (Timescale)   

[Security Hardening Best Practices for _Azure Database for PostgreSQL - Flexible Server_](https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/security-hardening-best-practices-for-postgresql-flexible-server/ba-p/3843404) 
Gennady Kostinsky (Microsoft)    

Code and Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/xubquinsev243jq3yxjs.jpg)](https://kmoppel.github.io/2023-06-07-til-filling-prepared-statement-placeholders-automatically-with-pgbadger/)  

[Automatically Filling Prepared Statement Placeholders with pgBadger](https://kmoppel.github.io/2023-06-07-til-filling-prepared-statement-placeholders-automatically-with-pgbadger/) — [pgBadger](https://github.com/darold/pgbadger) is a Postgres log analyzer with a specific feature to dump all queries from a log file in a format where bind parameters are interpolated into the queries directly. 

Kaarel Moppel   

[An Open Source Alternative to PostgreSQL on the Cloud. Sign Up for Early Access](https://resources.enterprisedb.com/biganimal-preview-offer-pgw/) 

EDB BigAnimal sponsor   

[Supabase Vector: An Open Source Vector Toolkit for Postgres and Python](https://supabase.com/vector) — Everyone wants to store embedding vectors lately for ML-powered search, and pgvector makes it easy to do with Postgres. Supabase goes a step further by wrapping it all up with their cloud platform and Python libraries. There’s also [a tutorial on building an image search feature](https://supabase.com/docs/guides/ai/examples/image-search-openai-clip) ([▶️ video version](https://www.youtube.com/watch?v=S7VZErcTN5Y)) with it. 

Supabase   

[credcheck v2.0: The Credential Checking Extension](https://www.postgresql.org/about/news/credcheck-v200-released-2654/) — credcheck can enforce rules around using secure credentials for user creation, password changes, and user renaming. v2.0 adds Postgres 16 compatibility, plus a feature to limit the number of auth failure attempts before a user is banned. 

Gilles Darold   

- [Bytebase 2.2](https://www.bytebase.com/changelog/bytebase-2-2-0/)
 ↳ Web-based collaboration workspace for DBAs.
- [PostgREST 11.1](https://github.com/PostgREST/postgrest)
 ↳ Serve a REST API from any Postgres database.
- [QuestDB 7.2](https://github.com/questdb/questdb/releases/tag/7.2)
 ↳ Time-series database with Postgres wire protocol support.
- [pgBackRest 2.46](https://www.postgresql.org/about/news/pgbackrest-246-released-2655/)    

“When going with Postgres, I thought 'this is the first thing we'll have to replace'. Still didn't happen after 6 years.” 

___
CodeSandbox co-founder Ives van Hoorne [🐦 posting on Twitter](https://twitter.com/CompuIves/status/1667148424389566465) about how CodeSandbox stores over 40 million sandboxes and 400 million files with Postgres.    

**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!_ 

--- 

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|*).
