Branching and multi-tenancy on object storage


Can you give me an example on how you manage multi-tenancy and branching using object storage keys ?

for instance let’s say that you have user u1 and u2, that both store database db1 in neon and both have branches main and dev. How would it be stored on s3 ? How and where do you manage the metadata regarding this information ?

NB: Posting links to the code would be much appreciated as well.

1 Like

Storage side (pageserver) doesn’t do anything specific about Postgres users. They are stored in pg_roles, as in usual Postgres, and thus barely distinguishable from just data – pushed to s3 in the same layers, etc. That’s just works – if parent contained such user, branch will contain it as well (unless it is deleted).

As for cloud users, sharing db/branch between them is not supported yet, I believe, though it would be cool.