logical replication - who is managing replication slots created automatically during initial sync

2024-08-26 Thread Avi Weinberg
Hi Experts I have seen that logical replication slots created automatically by Postgres during initial sync (a slot per table), are marked as "wal_status = lost" and "active = false". 1. Who is responsible for removing those faulty replication slots? 2. Can a slot with "wal_status = lo

Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

2024-08-26 Thread Justin Clift
On 2024-08-27 11:50, David Rowley wrote: On Tue, 27 Aug 2024 at 13:40, Tom Lane wrote: Yeah, it looks like that condition on "table_name" is not getting pushed down to the scan level anymore. I'm not sure why not, but will look closer tomorrow. I was looking for the offending commit as at fi

Re: Does a partition key need to be part of a composite index for the planner to take advantage of it? (PG 16.3+)

2024-08-26 Thread Laurenz Albe
On Tue, 2024-08-20 at 12:35 -0400, William Kaper wrote: > We have a set of operational tables that are all partitioned by organization > ID > (customer ID) in the 100M row range. We also have 3-4 composite indexes on > these > tables that currently do not include the organization ID. Any queries

Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

2024-08-26 Thread Tom Lane
David Rowley writes: > On Tue, 27 Aug 2024 at 13:40, Tom Lane wrote: >> Yeah, it looks like that condition on "table_name" is not getting >> pushed down to the scan level anymore. I'm not sure why not, >> but will look closer tomorrow. > So looks like it was the "Make Vars be outer-join-aware."

Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

2024-08-26 Thread David Rowley
On Tue, 27 Aug 2024 at 13:40, Tom Lane wrote: > Yeah, it looks like that condition on "table_name" is not getting > pushed down to the scan level anymore. I'm not sure why not, > but will look closer tomorrow. I was looking for the offending commit as at first I thought it might be related to Me

Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

2024-08-26 Thread Tom Lane
nikhil raj writes: > I've encountered a noticeable difference in execution time and query > execution plan row counts between PostgreSQL 13 and PostgreSQL 16 when > running a query on information_schema tables. Surprisingly, PostgreSQL 16 > is performing slower than PostgreSQL 13. Yeah, it looks

Re: Code of Conduct Committee Volunteer Drive

2024-08-26 Thread Chris Travers
On Tue, Aug 27, 2024, 5:09 AM Chris Travers wrote: > This message is being sent from the Community Code of Conduct Committee, > with the approval of the Core Team. > > As part of the Community CoC policy, the Committee membership is to be > refreshed on an annual basis. We are seeking up to 3 vol

Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

2024-08-26 Thread Adrian Klaver
On 8/26/24 15:41, nikhil raj wrote: Hi Adrian, Thanks for the quick response. I've already performed a vacuum, reindex, and analyze on the entire database, but the issue persists. As you can see from the execution plan, the time difference in PostgreSQL 16 is still significantly higher, even

Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

2024-08-26 Thread nikhil raj
Hi Adrian, Thanks for the quick response. I've already performed a vacuum, reindex, and analyze on the entire database, but the issue persists. As you can see from the execution plan, the time difference in PostgreSQL 16 is still significantly higher, even after all maintenance activities have be

Code of Conduct Committee Volunteer Drive

2024-08-26 Thread Chris Travers
This message is being sent from the Community Code of Conduct Committee, with the approval of the Core Team. As part of the Community CoC policy, the Committee membership is to be refreshed on an annual basis. We are seeking up to 3 volunteers to serve on the Committee for the coming year, October

Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

2024-08-26 Thread Adrian Klaver
On 8/26/24 14:49, nikhil raj wrote: Hi All, I've encountered a noticeable difference in execution time and query execution plan row counts between PostgreSQL 13 and PostgreSQL 16 when running a query on |information_schema| tables. Surprisingly, PostgreSQL 16 is performing slower than Postgre

Postgresql Code of Conduct Committee Update

2024-08-26 Thread Chris Travers
The Code of Conduct Committee is currently operating at reduced capacity due to multiple departures this year, and therefore acting with the minimum membership allowed by the code of conduct. Our current membership is noted at https://www.postgresql.org/about/policies/coc_committee/ Alexandra Abr

Re: On exclusion constraints and validity dates

2024-08-26 Thread Paul Jungwirth
On 8/22/24 11:13, Justin Giacobbi wrote: I have an issue that on the surface seems orthogonal to existing functionality. I’m trying to dynamically update validity ranges as new s replace old s. In a nutshell the problem looks like this: psqlprompt=# select * from rangetest; id |  

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Adrian Klaver
On 8/26/24 04:33, Jyoti Saxena wrote: Hi Ray, I appreciate the clarification regarding the release status of PostgreSQL 17. Understanding that it is currently in the beta phase, I am eager to integrate this version into my development and testing workflows. Could you please assist me by pro

Re: Problem with a Query

2024-08-26 Thread Ron Johnson
Aggressive autoanalyze and autovacuum settings solve most query problems. These are my settings: default_statistics_target = 5000 autovacuum_vacuum_scale_factor = 0.015 autovacuum_vacuum_threshold = 250 autovacuum_analyze_scale_factor = 0.015 autovacuum_analyze_threshold = 250 Such a high default_

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Ray O'Donnell
On 26/08/2024 12:33, Jyoti Saxena wrote: Hi Ray, I appreciate the clarification regarding the release status of PostgreSQL 17. Understanding that it is currently in the beta phase, I am eager to integrate this version into my development and testing workflows. Could you please assist me by

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Jyoti Saxena
Hi Ray, I appreciate the clarification regarding the release status of PostgreSQL 17. Understanding that it is currently in the beta phase, I am eager to integrate this version into my development and testing workflows. Could you please assist me by providing the following information: - Inst

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Kashif Zeeshan
On Mon, Aug 26, 2024 at 3:54 PM Jyoti Saxena wrote: > Hello, > > Thank you for the suggestion to compile PostgreSQL from source. However, I > am currently looking for a way to install PostgreSQL 17 through a package > manager or a precompiled version that can be more seamlessly integrated and > m

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Ray O'Donnell
On 26/08/2024 11:43, Ray O'Donnell wrote: On 26/08/2024 07:52, Jyoti Saxena wrote: Hi, I’m encountering an issue while trying to install PostgreSQL 17 on my Ubuntu 22.04 (Jammy) system. I followed the installation instructions from the official PostgreSQL website https://www.postgresql.org/

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Jyoti Saxena
Hello, Thank you for the suggestion to compile PostgreSQL from source. However, I am currently looking for a way to install PostgreSQL 17 through a package manager or a precompiled version that can be more seamlessly integrated and managed in my environment. Could you please confirm if PostgreSQL

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Ray O'Donnell
On 26/08/2024 07:52, Jyoti Saxena wrote: Hi, I’m encountering an issue while trying to install PostgreSQL 17 on my Ubuntu 22.04 (Jammy) system. I followed the installation instructions from the official PostgreSQL website https://www.postgresql.org/download/linux/ubuntu/. I don't know wh

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Kashif Zeeshan
To compile PG from code follow the below instructions. https://www.postgresql.org/docs/current/install-make.html Thanks Kashif Zeeshan On Mon, Aug 26, 2024 at 3:30 PM Kashif Zeeshan wrote: > > > On Mon, Aug 26, 2024 at 3:19 PM Jyoti Saxena > wrote: > >> Hi Kashif, >> >> Thank you for the instr

Problem with a query

2024-08-26 Thread Siraj G
Hello! We have a couple of queries that all of a sudden became rather slow. I took explain analyze from one of the SQLs as bdlow. Can you please check and suggest if anything can be done? '-> Table scan on (actual time=0.019..71.526 rows=38622 loops=1)\n -> Aggregate using temporary table (act

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Kashif Zeeshan
On Mon, Aug 26, 2024 at 3:19 PM Jyoti Saxena wrote: > Hi Kashif, > > Thank you for the instructions. I followed the steps provided to set up > the repository and install PostgreSQL. However, after completing the setup, > the system installed PostgreSQL 16.4 instead of the expected PostgreSQL 17.

Re: Problem with a Query

2024-08-26 Thread Siraj G
Thanks Tom. Collecting full stats on the tables involved corrected the execution. On Tue, Aug 13, 2024 at 9:57 AM Tom Lane wrote: > Siraj G writes: > > We migrated a PgSQL database from Cloud SQL to compute engine and since > > then there is a SQL we observed taking a long time. After some stud

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Jyoti Saxena
Hi Kashif, Thank you for the instructions. I followed the steps provided to set up the repository and install PostgreSQL. However, after completing the setup, the system installed PostgreSQL 16.4 instead of the expected PostgreSQL 17. The version installed is psql (PostgreSQL) 16.4 (Ubuntu 16.4-1.

Re: Issue Installing PostgreSQL 17 on Ubuntu 22.04 (Jammy)

2024-08-26 Thread Kashif Zeeshan
Hi Jyoti Make sure you have done the following repo setup sudo apt install curl ca-certificates sudo install -d /usr/share/postgresql-common/pgdg sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc # Create the repositor