Re: Access a Postgres storage with two independent instances - Mailing list pgsql-novice

From Alan Hodgson
Subject Re: Access a Postgres storage with two independent instances
Date
Msg-id 1decdbcd01ae61fc7a96517e66eae3834751c49e.camel@lists.simkin.ca
Whole thread Raw
In response to Re: Access a Postgres storage with two independent instances  (first last <ny.otherwrks@gmail.com>)
List pgsql-novice
On Tue, 2024-05-07 at 09:56 +0530, first last wrote:
Actually what I want is multiple Postgres instances to have read and write access to the same data storage directory. Anyway, that can not be possible as what you say. But, when I deploy MySQL/MongoDB deployment with multiple replicas to access the same storage, the all pods except one become CrashLoopBackOff state. This is happening for MySQL/Mongo. When it comes to Postgres, I deployed it with multiple pods, all the pods became healthy and there is no such CrashLoopBackOff state occurred. But those pods access different storages for every pod. Why this totally different from MySQL and Mongo?

No idea, but this doesn't appear to have anything to do with PostgreSQL. You could load any image in that container and then see what the storage looks like. Probably better asked on a kubernetes list somewhere.

Random thought, though, if you actually have multiple nodes in your k8s cluster, you might just be seeing an artifact of the ReadWriteOnce access mode. For a real shared volume you probably want ReadWriteMany, which only a few storage backends support (and which, again, PostgreSQL would not work on).

pgsql-novice by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Access a Postgres storage with two independent instances
Next
From: Matthew Mellon
Date:
Subject: INSERT ... SELECT nonpositional syntax