Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Andreas Joseph Krogh
På tirsdag 28. mai 2024 kl. 01:48:17, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Laurenz Albe writes: > On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote: >> I tried: >> REVOKE SELECT ON pg_catalog.pg_database FROM public; >> But that doesn't prevent a normal user from querying pg_d

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Tom Lane
Laurenz Albe writes: > On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote: >> I tried: >>    REVOKE SELECT ON pg_catalog.pg_database FROM public; >> But that doesn't prevent a normal user from querying pg_database it seems… > It works here. Works for me too, although you'd have to do

Re: expected authentication request from server, but received H

2024-05-27 Thread Adrian Klaver
On 5/27/24 14:19, Peter J. Holzer wrote: On 2024-05-23 17:23:14 -0400, Tom Lane wrote: "Peter J. Holzer" writes: One of our users reports getting the error message "expected authentication request from server, but received H" when trying to connect to the database. That's very bizarre, and I

Re: expected authentication request from server, but received H

2024-05-27 Thread Peter J. Holzer
On 2024-05-23 17:23:14 -0400, Tom Lane wrote: > "Peter J. Holzer" writes: > > One of our users reports getting the error message > > "expected authentication request from server, but received H" > > when trying to connect to the database. > > That's very bizarre, and I don't recall any similar re

Re: Autovacuum endless loop in heap_page_prune()?

2024-05-27 Thread Laurenz Albe
On Mon, 2024-05-27 at 15:49 +0200, Peter wrote: > > (but of course SQL_ASCII is a mistake). > > Really? I re-read the chapter on Locale/CharSet Support, and I don't > see the mistake. Only one can not convert that to anything else, which > is fine in this usecase (storing arbitrary filenames from

Re: Autovacuum endless loop in heap_page_prune()?

2024-05-27 Thread Peter
On Mon, May 27, 2024 at 01:51:56PM +0200, Laurenz Albe wrote: ! > ! Apart from hardware problems, one frequent cause is upgrading glibc ! > ! (if the index on a string column or expression). ! > ! > No, this is FreeBSD, we don't normally do such things... ;) ! ! You don't update the C library, o

Re: Autovacuum endless loop in heap_page_prune()?

2024-05-27 Thread Laurenz Albe
On Mon, 2024-05-27 at 12:48 +0200, Peter wrote: > On Mon, May 27, 2024 at 11:25:47AM +0200, Laurenz Albe wrote: > ! On Sat, 2024-05-25 at 12:51 +0200, Peter wrote: > ! >  I just found Autovacuum run for 6 hours on a 8 GB table, VACUUM query > ! > doesnt cancel, cluster doesn't stop, autovacuum work

Re: problem with query

2024-05-27 Thread Sašo Gantar
upgrade to "PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit" solved the problem regards, s On Wed, 22 May 2024 at 06:04, Sašo Gantar wrote: > ANALYZE pg_class; doesn't help > also, query is from "Hasura", so I don't have much r

Re: Autovacuum endless loop in heap_page_prune()?

2024-05-27 Thread Peter
On Mon, May 27, 2024 at 11:25:47AM +0200, Laurenz Albe wrote: ! On Sat, 2024-05-25 at 12:51 +0200, Peter wrote: ! >  I just found Autovacuum run for 6 hours on a 8 GB table, VACUUM query ! > doesnt cancel, cluster doesn't stop, autovacuum worker is not ! > killable, truss shows no activity, after k

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Laurenz Albe
On Mon, 2024-05-27 at 11:33 +0200, Andreas Joseph Krogh wrote: > På mandag 27. mai 2024 kl. 11:10:10, skrev Laurenz Albe > : > > On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote: > > > I tried: > > > > > >    REVOKE SELECT ON pg_catalog.pg_database FROM public; > > > > > > But that

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Andreas Joseph Krogh
På mandag 27. mai 2024 kl. 11:10:10, skrev Laurenz Albe < laurenz.a...@cybertec.at >: On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote: > I tried: > > REVOKE SELECT ON pg_catalog.pg_database FROM public; > > But that doesn't prevent a normal user from

Re: Autovacuum endless loop in heap_page_prune()?

2024-05-27 Thread Laurenz Albe
On Sat, 2024-05-25 at 12:51 +0200, Peter wrote: >  I just found Autovacuum run for 6 hours on a 8 GB table, VACUUM query > doesnt cancel, cluster doesn't stop, autovacuum worker is not > killable, truss shows no activity, after kill -6 this backtrace: > > * thread #1, name = 'postgres', stop reaso

Re: Long running query causing XID limit breach

2024-05-27 Thread Laurenz Albe
> On Fri, May 24, 2024 at 10:34 AM sud wrote: > > I am trying to understand these two parameters and each time it looks a bit > > confusing to me. > > If These two parameters complement or conflict with each other. > > > > Say for example, If we set hot_feedback_standby to ON (which is currently

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Laurenz Albe
On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote: > I tried: > > REVOKE SELECT ON pg_catalog.pg_database FROM public; > > But that doesn't prevent a normal user from querying pg_database it seems… It works here. Perhaps the "normal" user is a member of "pg_read_all_data". Yours, L

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Andreas Joseph Krogh
På fredag 24. mai 2024 kl. 19:02:13, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > Hi, is there a way to prevent a user/role from SELECT-ing from certain > system-tables? > I'd like the contents of pg_{user,roles,database} to not be visible to all > users. As note