Re: Unique key constraint Issue

2024-11-24 Thread ajit wangkhem
Output should be consistent across servers below query o/p SELECT conname, pg_get_constraintdef(oid) FROM pg_constraint WHERE conrelid = 'your table name'::regclass AND contype = 'u'; (different datatype combine in UK is not an issue). This issue may not happen in asynchronous, log shipping or s

Unique key constraint Issue

2024-11-24 Thread shashidhar Reddy
Hello, We have postgresql servers with PostgreSQL 13.10 on Ubuntu release 22.04. The issue is a unique key constraint with two columns one is character another is integer. At some point the unique key did not work as I see duplicate values with these two columns combination and it happened on m

Error creating materialized view

2024-11-24 Thread Shaun Robinson
Hi, I'm currently testing an application with Postgres 17.2 and am getting an error when creating a materialized view which works in version 16 and below. The sql works fine running as a query, but adding the create materialized view breaks it. The error comes when calling a custom function and t

Pg_basebackup failed or completed?

2024-11-24 Thread jayesh thakare
Hi Team, We have got below error while doing basebackup pg_basebackup: could not close file "0002022E00027": No error Can we assume that backup is completed successfully? Regards, Jayeshthakare Postgresql DBA 8828986182

JDBC using REFERENCES

2024-11-24 Thread Arbol One
In an application that uses JDBC I am trying to use the following statement *   // Table parameters     var sql = new MyString();     sql.setData("CREATE TABLE IF NOT EXISTS ");     sql.append(this.tableName);     sql.append(" (");  

Re: JDBC using REFERENCES

2024-11-24 Thread David G. Johnston
On Sunday, November 24, 2024, Arbol One wrote: > > > > > * sql.append("index SERIAL NOT NULL, "); > sql.append("id TEXT PRIMARY KEY, "); sql.append("CONSTRAIN > id PRIMARY KEY (id)"); **<== Error* > > > This is quite confusing, having the index column be serial but

Re: JDBC using REFERENCES

2024-11-24 Thread Rob Sargent
> On Nov 24, 2024, at 7:15 PM, Arbol One wrote: > >  > In an application that uses JDBC I am trying to use the following statement > >// Table parameters > var sql = new MyString(); > sql.setData("CREATE TABLE IF NOT EXISTS "); >

Re: JDBC using REFERENCES

2024-11-24 Thread David G. Johnston
On Sunday, November 24, 2024, Arbol One wrote: > > * sql.append("CONSTRAIN id PRIMARY KEY (id)"); **<== > Error* > > > The word constraint ends with a “T” David J.

JDBC using REFERENCES

2024-11-24 Thread Arbol One
In an application that uses JDBC I am trying to use the following statement *   // Table parameters     var sql = new MyString();     sql.setData("CREATE TABLE IF NOT EXISTS ");     sql.append(this.tableName);     sql.append(" (");  

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Ron Johnson
On Sun, Nov 24, 2024 at 4:58 PM Adrian Klaver wrote: > On 11/24/24 13:00, Ron Johnson wrote: > > On Sun, Nov 24, 2024 at 2:55 PM Christophe Pettus > > wrote: > > > > > On Nov 24, 2024, at 09:15, Ron Johnson > > wrote: > > >

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Adrian Klaver
On 11/24/24 13:00, Ron Johnson wrote: On Sun, Nov 24, 2024 at 2:55 PM Christophe Pettus > wrote: > On Nov 24, 2024, at 09:15, Ron Johnson mailto:ronljohnso...@gmail.com>> wrote: > > Doesn't the existence of a replication slot force PG to retain WAL fi

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Ron Johnson
On Sun, Nov 24, 2024 at 2:55 PM Christophe Pettus wrote: > > On Nov 24, 2024, at 09:15, Ron Johnson wrote: > > > > Doesn't the existence of a replication slot force PG to retain WAL files > when replication is broken? > > It does. I don't recall if the OP said that they were using a persistent

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Christophe Pettus
> On Nov 24, 2024, at 09:15, Ron Johnson wrote: > > Doesn't the existence of a replication slot force PG to retain WAL files when > replication is broken? It does. I don't recall if the OP said that they were using a persistent replication slot or not; it's not as common with binary replic

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Subhash Udata
Thank you, everyone, for your valuable clarifications and insights. Your guidance has been incredibly helpful in addressing my concerns and understanding the best approach to proceed. I truly appreciate the time and effort you’ve taken to assist me. On Sun, 24 Nov 2024 at 22:36, Christophe Pettus

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Christophe Pettus
> On Nov 24, 2024, at 09:03, Subhash Udata wrote: > When we shut down the standby, upgrade it, and then start it back up, will > the replication automatically resume from the primary to the standby? Assuming that the standby has access to any WAL generated during the shutdown (either still i

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Ron Johnson
On Sun, Nov 24, 2024 at 12:06 PM Christophe Pettus wrote: > > On Nov 24, 2024, at 09:03, Subhash Udata wrote: > > When we shut down the standby, upgrade it, and then start it back up, > will the replication automatically resume from the primary to the standby? > > Assuming that the standby has a

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Christophe Pettus
> On Nov 24, 2024, at 08:51, Subhash Udata wrote: > However, my concern lies in the fact that we are working with production > servers, where downtime is not acceptable. There is no way to upgrade community PostgreSQL, either to a new minor version or a new major version, with absolute zero

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Subhash Udata
Thank you for your valuable suggestion! I have a question regarding the process: When we shut down the standby, upgrade it, and then start it back up, will the replication automatically resume from the primary to the standby? Looking forward to your clarification. 2) What do you mean by resource

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Ron Johnson
On Sun, Nov 24, 2024 at 11:52 AM Subhash Udata wrote: > I understand your point and appreciate the clarification. > > I have reviewed the references and now have a better understanding of the > minor upgrade process. > > However, my concern lies in the fact that we are working with production > s

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Subhash Udata
I understand your point and appreciate the clarification. I have reviewed the references and now have a better understanding of the minor upgrade process. However, my concern lies in the fact that we are working with production servers, where downtime is not acceptable. Additionally, if a failov

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Ron Johnson
On Sun, Nov 24, 2024 at 11:41 AM Adrian Klaver wrote: > On 11/24/24 08:36, Subhash Udata wrote: > > The reason to upgrade from 15.0 to 15.9 is this > > https://www.postgresql.org/support/security/CVE-2024-10979/ > > > > > > Here it is

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Ron Johnson
On Sun, Nov 24, 2024 at 11:05 AM Subhash Udata wrote: > Dear PostgreSQL Community, > > I have a production database setup with a primary server and a standby > server. The database is currently running on *PostgreSQL 15.0*, and I > plan to upgrade both servers to *15.9*. > > I have the following

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Adrian Klaver
On 11/24/24 08:36, Subhash Udata wrote: The reason to upgrade from 15.0 to 15.9 is this https://www.postgresql.org/support/security/CVE-2024-10979/ Here it is mentioned that this vulnerability is fixed in 15.9 So our organization wa

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Subhash Udata
The reason to upgrade from 15.0 to 15.9 is this https://www.postgresql.org/support/security/CVE-2024-10979/ Here it is mentioned that this vulnerability is fixed in 15.9 So our organization wants an upgrade from 15.0 to 15.9 On Sun, 24 Nov 2024 at 21:48, Adrian Klaver wrote: > On 11/24/24 08:05

Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Adrian Klaver
On 11/24/24 08:05, Subhash Udata wrote: Dear PostgreSQL Community, I have a production database setup with a primary server and a standby server. The database is currently running on *PostgreSQL 15.0*, and I plan to upgrade both servers to *15.9*. I have the following questions regarding the

Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication

2024-11-24 Thread Subhash Udata
Dear PostgreSQL Community, I have a production database setup with a primary server and a standby server. The database is currently running on *PostgreSQL 15.0*, and I plan to upgrade both servers to *15.9*. I have the following questions regarding the upgrade and replication process: 1.