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 Pragmatic topics Top

telemachus
Python Testing With Pytest - Chapter 2, warnings for “unregistered custom marks” While running the smoke tests in Chapter 2, I get these...
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
simonpeter
When I try the command to create a pair of migration files I get an error. user=> (create-migration "guestbook") Execution error (Ill...
New
jdufour
Hello! On page xix of the preface, it says there is a community forum "… for help if your’re stuck on one of the exercises in this book… ...
New
cro
I am working on the “Your Turn” for chapter one and building out the restart button talked about on page 27. It recommends looking into ...
New
adamwoolhether
I’m not quite sure what’s going on here, but I’m unable to have to containers successfully complete the Readiness/Liveness checks. I’m im...
New
brunogirin
When installing Cards as an editable package, I get the following error: ERROR: File “setup.py” not found. Directory cannot be installe...
New
kolossal
Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
New
redconfetti
Docker-Machine became part of the Docker Toolbox, which was deprecated in 2020, long after Docker Desktop supported Docker Engine nativel...
New
SlowburnAZ
Getting an error when installing the dependencies at the start of this chapter: could not compile dependency :exla, "mix compile" failed...
New

Other popular topics Top

wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
PragmaticBookshelf
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1127 25298 747
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New

Latest in PragProg

View all threads ❯