autovacuum on primary blocking queries on replica?

2022-05-27 Thread Don Seiler
- PostgreSQL 12.9 - PGDG Ubuntu 18.04 image - Streaming physical replication - hot_standby_feedback = on We use a read replica to offload a lot of (what should be) quick queries. This morning we had an incident where these queries were all blocking on AccessShareLock waits, written to the

Re: Determine if range list contains specified integer

2022-05-27 Thread Sándor Daku
On Fri, 27 May 2022 at 18:19, Andrus wrote: > Hi! > > > Product type table contains product types. Some ids may missing : > > create table artliik (liiginrlki char(3) primary key); > insert into artliik values('1'); > insert into artliik values('3'); > insert into artliik values('

Re: Determine if range list contains specified integer

2022-05-27 Thread David G. Johnston
On Fri, May 27, 2022 at 9:19 AM Andrus wrote: > Product type table contains product types. Some ids may missing : > > > create table artliik (liiginrlki char(3) primary key); > As an aside, don't use the "character" data type: https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_cha

Re: Determine if range list contains specified integer

2022-05-27 Thread Adrian Klaver
On 5/27/22 03:51, Andrus wrote: Hi! How to all properties for given type. Query     select id     from artliik     join strings on ','||trim(strings.kirjeldLku)||',' like '%,'||trim(artliik.liiginrlki)||',%' returns date for single integer list only. How to change join so that type rang

Re: existing row not found by SELECT ... WHERE CTID = ?

2022-05-27 Thread Matthias Apitz
El día jueves, mayo 26, 2022 a las 12:02:35 -0400, Tom Lane escribió: > I wonder though if the > OP should be considering using SELECT FOR UPDATE in his cursor, > so that it'd automatically chain up to the newest row version. I diged into this but the CURSOR are all declared WITH HOLD and this co

Determine if range list contains specified integer

2022-05-27 Thread Andrus
Hi! Product type table contains product types. Some ids may missing :     create table artliik (liiginrlki char(3) primary key);     insert into artliik values('1');     insert into artliik values('3');     insert into artliik values('4');     ...     insert into artliik values('999'); Propert