andatki

andatki

Author of High Performance PostgreSQL for Rails

High Performance PostgreSQL for Rails: Do you run clusters on your MacBook?

Title: High Performance PostgreSQL for Rails

@aapsql @andatki

A reader wrote this by email. Re-posting here:

Do you run clusters on your MacBook?

I use macOS, yes. In the book, readers will install local (updating to 16 now) PostgreSQL (I recommend PostgresApp if you’re on macOS), and then do everything from there.

I also added some new shell scripts to provision the databases, roles, with app-specific schema, and minimal grants/privileges following some PostgreSQL best practices, to the Rideshare repository. You can find those in the “db” directory. There’s also other postgres config files added to the “postgresql” directory like .pgpass and pg_hba.conf as sample files, and I’ll expand on their purpose as needed for the book. These aren’t what you’d take into production, but they can help practice with those config files.

In production where I work we run Postgres mainly via AWS. The configuration is all quite different from this local config, although this local config would be closer to running PostgreSQL in a self-hosted way. Since a lot of startups use cloud providers like AWS, GCP, Azure, not to mention Crunchy Data etc. and other newer players like Supabase, Tembo, etc., I focused on the local PostgreSQL experience and direct installations.

I’m looking to add more instructions for Linux and Windows from volunteers. I’m also interested in dev containers and other modern containers that don’t add a lot of complexity. In later chapters, readers use Docker to run multiple instances of PostgreSQL with replication and other use cases. I will be working on updating those examples so they all use PostgreSQL 16 as well.

Does that answer your question? Please keep the feedback coming. Thanks!

Marked As Solved

andatki

andatki

Author of High Performance PostgreSQL for Rails

MacOS support will be ongoing. Some readers run Linux and report differences in their initial DB cluster roles and databases or things like that. GitHub source code examples for the book will be updated over time. Check there for the latest info.

Popular Prag Prog topics Top

jon
Some minor things in the paper edition that says “3 2020” on the title page verso, not mentioned in the book’s errata online: p. 186 But...
New
mikecargal
Title: Hands-On Rust (Chap 8 (Adding a Heads Up Display) It looks like ​.with_simple_console_no_bg​(SCREEN_WIDTH*2, SCREEN_HEIGHT*2...
New
lirux
Hi Jamis, I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019. This test doesn’t pass for me: ...
New
joepstender
The generated iex result below should list products instead of product for the metadata. (page 67) iex> product = %Product{} %Pento....
New
New
adamwoolhether
When trying to generate the protobuf .go file, I receive this error: Unknown flag: --go_opt libprotoc 3.12.3 MacOS 11.3.1 Googling ...
New
leonW
I ran this command after installing the sample application: $ cards add do something --owner Brian And got a file not found error: Fil...
New
taguniversalmachine
Hi, I am getting an error I cannot figure out on my test. I have what I think is the exact code from the book, other than I changed “us...
New
dachristenson
@mfazio23 Android Studio will not accept anything I do when trying to use the Transformations class, as described on pp. 140-141. Googl...
New
roadbike
From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New

Other popular topics Top

DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
PragmaticBookshelf
Author Spotlight Erin Dees @undees Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
New
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New

Latest in PragProg

View all threads ❯