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.

Where Next?

Popular Pragmatic Bookshelf topics Top

belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
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
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
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
curtosis
Running mix deps.get in the sensor_hub directory fails with the following error: ** (Mix) No SSH public keys found in ~/.ssh. An ssh aut...
New
jskubick
I’m running Android Studio “Arctic Fox” 2020.3.1 Patch 2, and I’m embarrassed to admit that I only made it to page 8 before running into ...
New
jskubick
I’m under the impression that when the reader gets to page 136 (“View Data with the Database Inspector”), the code SHOULD be able to buil...
New
jskubick
I found an issue in Chapter 7 regarding android:backgroundTint vs app:backgroundTint. How to replicate: load chapter-7 from zipfile i...
New
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
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

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1023 17214 380
New
AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
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
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New

Sub Categories: