SV: cpu-intensive immutable function and parallel scan

2021-06-22 Thread Niels Jespersen
>Fra: David Rowley Sendt: 22. juni 2021 09:10 >Emne: Re: cpu-intensive immutable function and parallel scan >On Tue, 22 Jun 2021 at 19:06, Niels Jespersen wrote: >> I think I could achieve some speedup by parallelizing further, distributing >> the cpu-work among additional workers. But, how do

Exclusion constraint with custom operator not working as expected

2021-06-22 Thread Rhys A.D. Stewart
Greetings All, Firstly, apologies for cross posting. I would like to create a table which will contain postGIS geometries, specifically linestrings. Each line string should be unique, unique in the sense that no linestring should st_equals any other. (see https://postgis.net/docs/manual-3.1/ST_Eq

Re: www.postgresql-archive.org content deleted

2021-06-22 Thread Vijaykumar Jain
i get it now, thanks., anyways, it does seem to be under serious attack.

Re: www.postgresql-archive.org content deleted

2021-06-22 Thread Vijaykumar Jain
On Tue, 22 Jun 2021 at 23:31, Magnus Hagander wrote: This site is not affiliated with the PostgreSQL project in any way, > it's an independent third party. > > The official PostgreSQL archives are on https://www.postgresql.org/list/ > > coola, many thanks. that's good to hear.

Re: www.postgresql-archive.org content deleted

2021-06-22 Thread Tom Lane
Vijaykumar Jain writes: > Ok, i am not sure if this is the right place to post this, > I am seeing a lot of messages from archives, shown as deleted. > PostgreSQL - performance - Estimating wal_keep_size | Threaded View > (postgresql-archive.org) >

Re: www.postgresql-archive.org content deleted

2021-06-22 Thread Magnus Hagander
On Tue, Jun 22, 2021 at 7:59 PM Vijaykumar Jain wrote: > > Ok, i am not sure if this is the right place to post this, > > I am seeing a lot of messages from archives, shown as deleted. > PostgreSQL - performance - Estimating wal_keep_size | Threaded View > (postgresql-archive.org) > > if i open a

www.postgresql-archive.org content deleted

2021-06-22 Thread Vijaykumar Jain
Ok, i am not sure if this is the right place to post this, I am seeing a lot of messages from archives, shown as deleted. PostgreSQL - performance - Estimating wal_keep_size | Threaded View (postgresql-archive.org) if i

Re: second CTE kills perf

2021-06-22 Thread Tom Lane
Nicolas Seinlet writes: > I'm trying to understand this behaviour and the limits of CTE, when they > reach the limits, when they cannot receive parameters from a caller, ... I'm > running a query on PostgreSQL 10 with a cte. the query runs in ~ 10 seconds. > If I add a second CTE with the same

Re: cpu-intensive immutable function and parallel scan

2021-06-22 Thread Tom Lane
David Rowley writes: > On Tue, 22 Jun 2021 at 19:06, Niels Jespersen wrote: >> I think I could achieve some speedup by parallelizing further, distributing >> the cpu-work among additional workers. But, how do I achive that best? > You'll want to ensure max_parallel_workers_per_gather is set hig

Re: second CTE kills perf

2021-06-22 Thread Vijaykumar Jain
On Tue, 22 Jun 2021 at 13:50, Nicolas Seinlet wrote: > Hello, > > oversimplified example: > 10 seconds version: > | WITH cte1 AS (SELECT x,y,z FROM table) SELECT row_number() over(),x,y,z > FROM cte1 WHERE x=32; > > 10 minutes version: > | WITH cte1 AS (SELECT x,y,z FROM table), cte2 AS (SELECT r

Highly Available Postgres on Kubernetes

2021-06-22 Thread Venkat Pathi
Hello Users, Our application is in Kubernetes and currently, Standalone Postgres Pod is deployed without HA. I am tasked to implement a solution for Postgres HA on kubernetes. I was wondering, what is the most popular and active solution out there which provides HA for Postgres on Kubernetes with

Re: replace inside regexp_replace

2021-06-22 Thread Oliver Kohll
On Mon, 21 Jun 2021 at 15:09, Francisco Olarte wrote: > Oliver: > > On Mon, Jun 21, 2021 at 3:27 PM Oliver Kohll > wrote: > ... > > My attempt to do that is the regex > > select regexp_replace( > > 'here is [[my text]] to replace and [[some more]]', > > E'\\[\\[(.*?)\\]\\]', > > replace(E'\\1',

Re: Postgres PANIC when it could not open file in pg_logical/snapshots directory

2021-06-22 Thread Vijaykumar Jain
On Tue, 22 Jun 2021 at 13:32, Mike Yeap wrote: > Hi all, > > I have a Postgres version 11.11 configured with both physical replication > slots (for repmgr) as well as some logical replication slots (for AWS > Database Migration Service (DMS)). This morning, the server went panic with > the follow

second CTE kills perf

2021-06-22 Thread Nicolas Seinlet
Hello, I'm trying to understand this behaviour and the limits of CTE, when they reach the limits, when they cannot receive parameters from a caller, ... I'm running a query on PostgreSQL 10 with a cte. the query runs in ~ 10 seconds. If I add a second CTE with the same query as the previous one

Postgres PANIC when it could not open file in pg_logical/snapshots directory

2021-06-22 Thread Mike Yeap
Hi all, I have a Postgres version 11.11 configured with both physical replication slots (for repmgr) as well as some logical replication slots (for AWS Database Migration Service (DMS)). This morning, the server went panic with the following messages found in the log file: 2021-06-22 04:56:35.314

Re: cpu-intensive immutable function and parallel scan

2021-06-22 Thread David Rowley
On Tue, 22 Jun 2021 at 19:06, Niels Jespersen wrote: > I think I could achieve some speedup by parallelizing further, distributing > the cpu-work among additional workers. But, how do I achive that best? You'll want to ensure max_parallel_workers_per_gather is set high enough and you have max_pa

cpu-intensive immutable function and parallel scan

2021-06-22 Thread Niels Jespersen
Hello all I have a cpu-intensive plpython3u function that computes a result on the value from a single column value from a simple select.This looks largely like this. select function_name (t1.val1, 'constant1') from t1 where t1.p = '202012_1' and t1.val1 is not null; The function is marked imm