How to securely isolate databases/users in a multi-tenant Postgresql?

From: Alex Lee <alexxlee133(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to securely isolate databases/users in a multi-tenant Postgresql?
Date: 2023-06-09 06:54:42
Message-ID: CAL2iA8j=pQ3w-foNqFSpQqawuBauRHXTtqqZRk6Ggg9grAAdUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to make a service that gives each of my users their own PG user and
database. I want to keep them isolated from each other. There are no
special extensions installed, it's a pretty vanilla PG cluster.

Are there any considerations beyond making each person their own user and
owner of their own database like this, and letting them connect to the
database?

```
create user u2745;
create database d2745 owner u2745;
-- etc.
```

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2023-06-09 06:59:25 Re: How To: A large [2D] matrix, 100,000+ rows/columns
Previous Message Rama Krishnan 2023-06-09 05:51:20 How to store query result into another table using stored procedure