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

Razor54672
The answer to 3rd Problem of Chapter 5 (Making Choices) of “Practical Programming, Third Edition” seems incorrect in the given answer ke...
New
Alexandr
Hi everyone! There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
raul
Hi Travis! Thank you for the cool book! :slight_smile: I made a list of issues and thought I could post them chapter by chapter. I’m rev...
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |> handle_event() |> render() but the correc...
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
patoncrispy
I’m new to Rust and am using this book to learn more as well as to feed my interest in game dev. I’ve just finished the flappy dragon exa...
New
AndyDavis3416
@noelrappin Running the webpack dev server, I receive the following warning: ERROR in tsconfig.json TS18003: No inputs were found in c...
New
jskubick
I think I might have found a problem involving SwitchCompat, thumbTint, and trackTint. As entered, the SwitchCompat changes color to hol...
New
dtonhofer
@parrt In the context of Chapter 4.3, the grammar Java.g4, meant to parse Java 6 compilation units, no longer passes ANTLR (currently 4....
New
gorkaio
root_layout: {PentoWeb.LayoutView, :root}, This results in the following following error: no “root” html template defined for PentoWeb...
New

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
PragmaticBookshelf
“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco Ever wonder how authoring books compares to writing articles?...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
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
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New

Sub Categories: