Re: How to customize postgres for sharing read-only tables in multiple data-dirs between servers

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: "Guttman, Maoz" <maoz(dot)guttman(at)intel(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to customize postgres for sharing read-only tables in multiple data-dirs between servers
Date: 2021-02-21 18:39:03
Message-ID: 20210221183903.GO14772@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 16, 2021 at 01:49:02PM +0000, Guttman, Maoz wrote:
> Hi,
>
> Problem statement:
> I have to develop a solution in which a single source populates a table. Once the table is populated, it is considered as read-only and then we run many read-only queries on it.
> Such read-only tables are generated by multiple simulation runs: each simulation populates an independent table, meaning there is no cross-write to the tables.

I don't think you can share data dir or its files across clusters.
Things like autovacuum will want to be able to write to the data dir.

I don't think you can create a table-am which handles only "read-only"
operations - currently they're all required.

Did you think about using FDWs for this, instead ?
Otherwise, maybe you could make a copy of the cluster (like with a filesystem
clone) or pg-basebackup, or you could use replication.

--
Justin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniele Varrazzo 2021-02-21 18:39:12 Re: Is a connection max lifetime useful in a connection pool?
Previous Message Joel Jacobson 2021-02-21 18:27:25 Re: Bizarre behavior of \w in a regular expression bracket construct