pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Matt Andrews <mattandrews@massey.com.au>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Users, Roles and Connection Pooling
Date: Wed, 2 Oct 2019 14:44:11 -0400
Message-ID: <20191002184411.GK6962@tamriel.snowman.net> (raw)
In-Reply-To: <CAPeDGQ5TjXO0EmPsZy9+y6d2Q9hx2usy_pxcVK6Uw8wk-NKb3Q@mail.gmail.com>
References: <CAPeDGQ5XeuHKmp5LPcJ2AXiuUiS8+3n+xvsQoordz7GnHEenfQ@mail.gmail.com>
	<0503910ff326d635e681849565de20db63c63eca.camel@cybertec.at>
	<20191002074310.GH6962@tamriel.snowman.net>
	<CAPeDGQ5TjXO0EmPsZy9+y6d2Q9hx2usy_pxcVK6Uw8wk-NKb3Q@mail.gmail.com>

Greetings,

(we don't top-post on these lists, fyi, please reply in-line and trim)

* Matt Andrews (mattandrews@massey.com.au) wrote:
> I have little experience in this area, but it seems like having a Postgres
> role for every application user is the right way to do things. It’s just
> that it also seems really inconvenient.

I agree that there are some drawbacks to it.

> For example how to map an application’s users/people table to Postgres
> roles? The pg_role name field is limited to 64 bytes, you can’t create a
> foreign key to pg_role. What’s the answer? Use UUIDs as usernames or
> something?

Yeah, it would be nice to have an answer to the FK issue when it comes
to roles (and possibly other things..).  The limit on length is annoying
but I'm not sure that it's show-stopper.  I don't think using UUIDs is a
good idea, at all...

> There’s very little out there on this topic, but surely this has been done
> before.

Oh, absolutely, but with compromises, particularly around FKs and such.

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (10+ messages)  latest in thread

Message-ID: <20191002184411.GK6962@tamriel.snowman.net>
Permalink:  ../20191002184411.GK6962@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20191002184411.GK6962@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, mattandrews@massey.com.au, laurenz.albe@cybertec.at
  Subject: Re: Users, Roles and Connection Pooling
  In-Reply-To: <20191002184411.GK6962@tamriel.snowman.net>
  References: <CAPeDGQ5XeuHKmp5LPcJ2AXiuUiS8+3n+xvsQoordz7GnHEenfQ@mail.gmail.com> <0503910ff326d635e681849565de20db63c63eca.camel@cybertec.at> <20191002074310.GH6962@tamriel.snowman.net> <CAPeDGQ5TjXO0EmPsZy9+y6d2Q9hx2usy_pxcVK6Uw8wk-NKb3Q@mail.gmail.com> <20191002184411.GK6962@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox