Re: Avg/max size of these JSON docs in Postgres

2021-10-13 Thread Simon Riggs
On Tue, 12 Oct 2021 at 23:07, Tomas Vondra wrote: > So yeah, there's an explicit 1GB limit per value, but having rows close > to the 1GB limit is going to cause all sorts of unpredictable and rather > painful issues :-( Sounds worth mentioning in doc/src/sgml/limits.sgml -- Simon Riggs

Grant select for all tables of the 12 schemas of my one db ?

2021-10-13 Thread celati Laurent
Good morning, I work on Postgresql 13 (windows) and Postgis. For some "basic USERS", i have to grant select/read for all tables of the 12 schemas of my db ? With Postgresql 13, i am obliged to write : *GRANT SELECT ON ALL TABLES IN SCHEMA TO username ?* Or a easiest way is possible? With Postg

Re: Grant select for all tables of the 12 schemas of my one db ?

2021-10-13 Thread hubert depesz lubaczewski
On Wed, Oct 13, 2021 at 11:04:42AM +0200, celati Laurent wrote: > Good morning, > > I work on Postgresql 13 (windows) and Postgis. > For some "basic USERS", i have to grant select/read for all tables of the > 12 schemas of my db ? > > With Postgresql 13, i am obliged to write : > *GRANT SELECT O

Re: Grant select for all tables of the 12 schemas of my one db ?

2021-10-13 Thread Vijaykumar Jain
something like this ? do $$ declare sch text; stmt text; begin for sch in select nspname from pg_namespace where nspname not like 'pg\_%' and nspname not like 'information%' loop -- use what you want, filter out rest stmt = 'GRANT USAGE ON SCHEMA ' || sch || ' TO readonlyuser_role'; raise notice

Re: Grant select for all tables of the 12 schemas of my one db ?

2021-10-13 Thread hubert depesz lubaczewski
On Wed, Oct 13, 2021 at 03:33:20PM +0530, Vijaykumar Jain wrote: > something like this ? Like, but not exactly. Consider what will happen if you have schema named "whatever something else" - with spaces in it. Or "badlyNamedSchema". Generally you'd want to use: execute format('GRANT USAGE ON SC

Re: Grant select for all tables of the 12 schemas of my one db ?

2021-10-13 Thread Vijaykumar Jain
On Wed, 13 Oct 2021 at 16:30, hubert depesz lubaczewski wrote: > On Wed, Oct 13, 2021 at 03:33:20PM +0530, Vijaykumar Jain wrote: > > something like this ? > > Like, but not exactly. > > Consider what will happen if you have schema named "whatever something > else" - with spaces in it. Or "badlyN

Detecting mis-planning of repeated application of a projection step

2021-10-13 Thread p...@cmicdo.com
The 13.4 release notes document the following:  > Fix mis-planning of repeated application of a projection step (Tom Lane)  >  >  The planner could create an incorrect plan in cases where two  >  ProjectionPaths were stacked on top of each other. The only known  >  way to trigger that

Re: Detecting mis-planning of repeated application of a projection step

2021-10-13 Thread Tom Lane
"p...@cmicdo.com" writes: > The 13.4 release notes document the following: >  > Fix mis-planning of repeated application of a projection step (Tom Lane) >  > >  >  The planner could create an incorrect plan in cases where two >  >  ProjectionPaths were stacked on top of each other. The onl

Re: Replication between different architectures

2021-10-13 Thread hubert depesz lubaczewski
On Wed, Oct 13, 2021 at 05:09:36PM +0100, Phil Endecott wrote: > Is replication going to work from an x86-64 master to an > arm64 replica? Hi, tested, works well. Best regards, depesz

Re: Replication between different architectures

2021-10-13 Thread Tom Lane
"Phil Endecott" writes: > Is replication going to work from an x86-64 master to an > arm64 replica? The hard part of this is usually whether the operating systems are identical. If they have different locale data, you may find that indexes on text columns appear out-of-order and therefore corrup

Replication between different architectures

2021-10-13 Thread Phil Endecott
Dear Experts, Is replication going to work from an x86-64 master to an arm64 replica? These are AWS EC2 instances, both 64-bit. I may eventually move them all to ARM, but have a mix of architectures temporarily. What could possibly go wrong ?! (If it does fail, will I notice before it's too lat

Re: GIN index

2021-10-13 Thread Tomas Vondra
Hi, Why exactly are you starting a new thread again, instead of continuing in the thread you started a couple days ago? A couple recommendations: 1) I find it unlikely you'll get a lot of help unless you provide a way to reproduce the issue easily. That is, something people can build and te

NOTIFY queue is at 66% and climbing...

2021-10-13 Thread Jeff Ross
Hi all, On 10.15 I'm getting the following on a logically replicated server. From the CSV logs: 2021-10-13 18:49:39.792 EDT,,,213601,,6143c257.34261,64243,,2021-09-16 18:16:55 EDT,4/3914851,60709901,WARNING,01000,"NOTIFY queue is 66% full","" 2021-10-13 18:49:46.058 EDT,,,213601,,6143

Re: NOTIFY queue is at 66% and climbing...

2021-10-13 Thread Tom Lane
Jeff Ross writes: > On 10.15 I'm getting the following on a logically replicated server. > 2021-10-13 18:49:39.792 EDT,,,213601,,6143c257.34261,64243,,2021-09-16 > 18:16:55 EDT,4/3914851,60709901,WARNING,01000,"NOTIFY queue is 66% > full","" > In the CSV logs above what part points to

RE: Duplicate key in UUID primary key index...

2021-10-13 Thread Eric Tobias
I have a table with a UUID as the primary key field. I am using a procedure to insert a parent and child record and using a UUID generated by an external system (webhook). The UUID insert is generating a "duplicate key" error on insert, but when I SELECT the uuid, nothing is returned. I've even

Re: Replication between different architectures

2021-10-13 Thread Phil Endecott
Tom Lane wrote: "Phil Endecott" writes: Is replication going to work from an x86-64 master to an arm64 replica? The hard part of this is usually whether the operating systems are identical. If they have different locale data, you may find that indexes on text columns appear out-of-order and