Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vTMxG-001IVg-2l for pgsql-admin@arkaria.postgresql.org; Wed, 10 Dec 2025 16:22:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vTMxF-00CfHQ-0J for pgsql-admin@arkaria.postgresql.org; Wed, 10 Dec 2025 16:22:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vTMxE-00CfGs-20 for pgsql-admin@lists.postgresql.org; Wed, 10 Dec 2025 16:22:17 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vTMxD-004A2f-0B for pgsql-admin@lists.postgresql.org; Wed, 10 Dec 2025 16:22:16 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-3ec5df386acso4367468fac.1 for ; Wed, 10 Dec 2025 08:22:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765383734; x=1765988534; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KfoRe0S0B8dEdldn8aNwhUDB8LojTkyyyR9BvKXbjIs=; b=IPYRqcUiaQTlD/39AOTm2EwaMCZSM6+wNcjSIz/WOlp8DJTfN77HBC6pCoxB26hN6X Js+FK0aM76s9s2E1B/VJ7kIOP5oBXLMzA8JcidEUDB+/xP5VbBRh+e1McQN7AfSeRsbS CUf4pmgvQqU9IhVqSVPgxdr54nPnWaNhNTvHNJbiplE73KPHoKTL7cKJUC8GwNgwZCSR sqpCpexzI9OqHOrpK6Hwjm0kYO4m0Pymn7DSW8fHq5vO0nGeL0xww4HdOTtdgUaqghbY OoqOBfO87nQFwiOdYZBV+T7vaAX1n1wIh1XjiZx9aGzVkjn2gHmEqp0PihAamBuwYXhf IEKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765383734; x=1765988534; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KfoRe0S0B8dEdldn8aNwhUDB8LojTkyyyR9BvKXbjIs=; b=wQ0cd/QswcMPMyYzWjkkVd2Z/tlyCe/6wsd+wYAvEXACETuMU3kSNiQ+OVrpN4aB08 TwCcVxAT/XH+qNa2vjeEr8tc/g6oeQVEwofP44xsrtN3TP8r1QuQgDvzNENoy0v86cBk ytwB+OT9JoyyO8Z/K1zKcq3DBIFotIRSF2R8BkX3ecVy0MQStq+hhZbqEx8vwXA1SWCu A7vhFuS3mU6OIDj5Kcj962BKRf7dRc2Z7LhRM3SkOONOYW99PP/eiGiGVhZ8/4t7le34 SRew+vVwf/XWImivCsuiZ+uQmftkck3Ek9CecGnPX2gwrMz8ZGI9GgFVi2MKkOij28l1 656g== X-Forwarded-Encrypted: i=1; AJvYcCXrz7K5BF/VlajG1bAR3eTdnN6pJIIrmX03FtTOrJGZgbXDlcLMwtrbmQoGTg6NR0E1bb3Z/0e5Q8sQRQ==@lists.postgresql.org X-Gm-Message-State: AOJu0YzoFoV5KVpWBbcdBdTyvXwpA7erVAdGKsP2r7kTdNgZcdcUpfyp jhMzw7XlmfCPMAqMS1ClHxpmCUlW1/gS4GIQcnGDIc4LYzCubep4LOIu3YuaUgpJ56v3s9mwmrW q47xlgK41f5oHRQUMvYrUhpFRYGujkXJ7LQ== X-Gm-Gg: AY/fxX6DIYYBqF+sZyHaWfNLBjcCyGHIdMm4cXn5iERiDGF5I8uRgCFBF5wfZLGssn1 AzzP+3BktbXc4k+Lv1nWEDToL9Hphii1wa9fW07SrTvpDWQHsVp4oNO2fGL+4qQ0uyRauoFHhpT fz7QP2JwuxbiOPHYiMTCuFfaXTaDq/EN6/kCKc1ai9yecz79Gl4CsFShB+0ZKsZs1mmzoRrlWcr dfhiaBs1AfVOz3V5ZdInxlTcuwrB/FKO6DEUZfZv26rvd8w0O+HTgbXAouVyqMiJcWl/jf6+sHv 1av4Mg1JTVJNXgZhzgTM4thhdos7y+IbRin48QypEYjJhDJrWVxFu86n X-Google-Smtp-Source: AGHT+IHdzv3GNPlfm2QaRAdwh8OVDEoYyfbSFRoFfpujYyTb0FHZYyMsQId0H08Quip94Fj9C4wZ9IvyF3Z+2zeca4M= X-Received: by 2002:a05:6870:14d3:b0:3ec:44d7:ad51 with SMTP id 586e51a60fabf-3f5bd9570dfmr1907957fac.2.1765383734236; Wed, 10 Dec 2025 08:22:14 -0800 (PST) MIME-Version: 1.0 References: <72acf8ae4e56886081b9f632569f290d3246c33b.camel@cybertec.at> <8536f893e79693bd0a23d4cea7dbe0b6366378df.camel@cybertec.at> In-Reply-To: From: richard coleman Date: Wed, 10 Dec 2025 11:22:03 -0500 X-Gm-Features: AQt7F2pORfeEPTeXGXEzoGvV5uoC-byb9OJBhU9cAIVPVneXF6ei4QGLc_1C50Q Message-ID: Subject: Re: database specific pg_read_all_data / pg_write_all_data To: "David G. Johnston" Cc: Laurenz Albe , Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000005f1b9206459b6e3e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005f1b9206459b6e3e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable David, The most common situation is when there are disparate groups, each with their own databases that are expected to have access to all of the schema/tables/views in that database regardless of who creates them. When that group has their own PostgreSQL cluster, the simpilest way to achive this is to grant all of those users membershipo in the pg_read_all_data and pg_write_all_data built-in roles. Unfortunately, the way that these roles work, this isn't an option when there are multiple groups, each with their own database, sharing a PostgreSQL cluster. Previously those users were sharing a single role so that they didn't run into priviledge issues. We've been discouraging this practice from continuing for obvious reasons. Without a database specific version of the pg_read_all_data and pg_write_all_data built in roles we have to rely upon the users, some who aren't particularly database savy, to remember to either reassign ownership of their objects to a shared group role, or explicitely grant privs to other members of their group. As you can expect it isn't ideal and the DBA has to occationally step in to grant these privs. This is why I was inquiting after database specific versions of those built-in roles. Just as we can currently assign database specific privs; connect, temporary, etc., being able to do the same with these built-in roles would be a godsend. I hope that helps clear things up. rik. On Wed, Dec 10, 2025 at 9:25=E2=80=AFAM David G. Johnston < david.g.johnston@gmail.com> wrote: > On Wednesday, December 10, 2025, richard coleman < > rcoleman.ascentgl@gmail.com> wrote: >> >> I hope that the PostgreSQL devs revisit it in the future with an eye >> towards making it applicable in more situations. >> > > There are setups where roles can access multiple databases and in some of > those they have read/write all privileges and in others they do not? > > Fundamentally making group-role memberships per-database is a fundamental > change that seems quite unappealing to attempt without a solid use case > that it will enable. iMO you=E2=80=99ve claims here do not establish a s= olid use > case - they are lacking convincing details. That said, the project is op= en > source - you can scratch your own itch. But the model change is still a > complexity hill to overcome. > > David J. > > --0000000000005f1b9206459b6e3e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
David,

The most common situation is whe= n there are disparate groups, each with their own databases that are expect= ed to have access to all of the schema/tables/views in that database regard= less of who creates them.

When that group has thei= r own PostgreSQL cluster, the simpilest way to achive this is to grant all = of those users membershipo in the pg_read_all_data and pg_write_all_data bu= ilt-in roles.=C2=A0 Unfortunately, the way that these roles work, this isn&= #39;t an option when there are multiple groups, each with their own databas= e, sharing a PostgreSQL cluster.

Previously those = users were sharing a single role so that they didn't run into priviledg= e issues.=C2=A0 We've been discouraging this practice from continuing f= or obvious reasons.

Without a database specific ve= rsion of the pg_read_all_data and pg_write_all_data built in roles we have = to rely upon the users, some who aren't particularly database savy, to = remember to either reassign ownership of their objects to a shared group ro= le, or explicitely grant privs to other members of their group.=C2=A0 As yo= u can expect it isn't ideal and the DBA has to occationally step in to = grant these privs.

This is why I was inquiting aft= er database specific versions of those built-in roles.=C2=A0 Just as we can= currently assign database specific privs; connect, temporary, etc., being = able to do the same with these built-in roles would be a godsend.

I hope that helps clear things up.
rik.

On Wed, Dec 10, 2025 at 9:25=E2=80=AFAM David G. Johnston= <david.g.johnston@gmail.c= om> wrote:
rcoleman.ascentgl@gmail.com> wrote:
I hope that the PostgreSQL devs revisit it in the future with an e= ye towards making it applicable in more situations.

There are setups where roles can access multiple datab= ases and in some of those they have read/write all privileges and in others= they do not?

Fundamentally making group-role memb= erships per-database is a fundamental change that seems quite unappealing t= o attempt without a solid use case that it will enable. =C2=A0iMO you=E2=80= =99ve claims here do not establish a solid use case - they are lacking conv= incing details.=C2=A0 That said, the project is open source - you can scrat= ch your own itch.=C2=A0 But the model change is still a complexity hill to = overcome.

David J.

--0000000000005f1b9206459b6e3e--