Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Rob Sargent
On 2/13/23 21:35, Damian Carey wrote: Tom, Rob & Adrian, I understand exactly what each of you are getting at, but instead of fumbling and further wasting your time I'm going to get a freelancer to smash out a suitable setup sans beginner mistakes. It's a pretty basic problem for a learned co

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Damian Carey
Tom, Rob & Adrian, I understand exactly what each of you are getting at, but instead of fumbling and further wasting your time I'm going to get a freelancer to smash out a suitable setup sans beginner mistakes. It's a pretty basic problem for a learned colleague. I've clearly thrived in my safely

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Adrian Klaver
On 2/13/23 13:45, Damian Carey wrote: Hi, Amateur question here :-{  Despite using Postgres for 15 years it's always been locked safely inside a VPS with Hibernate on top powering a Java web app. Each customer is on a separate VPS which typically has ~500k rows over about 30 tables. Basic but

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Tom Lane
Damian Carey writes: > Still on a "permissions" theme ... is their any glaring issues that are > required to provide a random linux user with permissions to access a DB? Well ... if they can "see" the postgres DB then there should be no such issues, as they evidently managed to establish a databa

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Rob Sargent
On 2/13/23 16:14, Damian Carey wrote: Thx Tom Fine advice that I will follow up. One tiny thing without wasting (too much) more of your time. In the working "promiscuous" version they get access the VPS as the same linux user that my product is running on, and superuser PG access. In the fa

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Damian Carey
Thx Tom Fine advice that I will follow up. One tiny thing without wasting (too much) more of your time. In the working "promiscuous" version they get access the VPS as the same linux user that my product is running on, and superuser PG access. In the failed version their SSH login is as a diffe

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Tom Lane
Damian Carey writes: > The PP product is on MSSQL, so they use some connector (sorry, no idea > what) from the customer PC to access my PG14 on Ubuntu. Black boxes are fun aren't they. > This is their screenshot supplied to me of a working connection > [image: image.png] > Below is our seco

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Damian Carey
Hi Tom, Sorry for the kinda-complicated response. We have worked for years with this other product (let's call it PP), and maybe 20% of our customers are in common, traditionally both products sitting on the same windows PC in some office accessing localhost PG. No problem. All data belongs to th

Re: HOWTO? Permissions for user to access a single db

2023-02-13 Thread Tom Lane
Damian Carey writes: > We now need to provide access to an associate company to a single database > (3 tables, ~10k rows) that our java app writes to (not JDBC, via > Hibernate). We have a nice SSH tunnel coming in, but they cannot view the > shared database (yes, I'm an amateur). > I'm just look

HOWTO? Permissions for user to access a single db

2023-02-13 Thread Damian Carey
Hi, Amateur question here :-{ Despite using Postgres for 15 years it's always been locked safely inside a VPS with Hibernate on top powering a Java web app. Each customer is on a separate VPS which typically has ~500k rows over about 30 tables. Basic but very effective. We now need to provide ac

Re: [Testcase] Queries running forever, because of wrong rowcount estimate

2023-02-13 Thread Peter
On Mon, Feb 13, 2023 at 12:38:12PM -0500, Tom Lane wrote: ! Peter writes: ! > "rows=1" in the "Hash Anti Join" line is WRONG. It should be ! > 300. Or at least some thousands. ! ! FWIW, this behaves better in v14 and up. In older versions there's ! an ambiguity about what relpages=reltuples=

Re: [Testcase] Queries running forever, because of wrong rowcount estimate

2023-02-13 Thread Tom Lane
Peter writes: > "rows=1" in the "Hash Anti Join" line is WRONG. It should be > 300. Or at least some thousands. FWIW, this behaves better in v14 and up. In older versions there's an ambiguity about what relpages=reltuples=0 means; it's the state when ANALYZE has never yet examined the table