Re: Question About PostgreSQL Extensibility

2023-10-17 Thread Chris Travers
On Mon, Oct 16, 2023 at 10:59 PM Laurenz Albe wrote: > On Fri, 2023-10-13 at 13:55 +, felix.quin...@yahoo.com wrote: > > For the same reason that you can use python or perl in postgresql. It's > just another language. > > I have .net code running on several sql servers and to change the > dat

PITR partial timing

2023-10-17 Thread Rama Krishnan
Hi team, I m testing PITR 1.if I am doing full recovery what ever the new tables were create will not be appear how to handle it 2. I have given my logs which time log I have to choose for PITR partial recovery 2023-10-16 16:22:35 UTC [16561]: [13-1] user=postgres,db=postgresLOG: statement:

Re: PITR partial timing

2023-10-17 Thread Ron
Don't write your own PITR.  Use PgBackRest, barman, etc. On 10/16/23 12:08, Rama Krishnan wrote: Hi team, I  m testing PITR 1.if I am doing full recovery what ever the new tables were create will not be appear how to handle it 2. I have given my logs which time log I have to choose for PITR

Logical Replication - Adding Not-Null Column Without Default Value

2023-10-17 Thread Avi Weinberg
Hi Experts, I'm using logical replication with Postgres 15. I added not-null column without default value to one of my published tables. The way I so it on publisher side is to add the column as nullable, then update the value based on some logic, and finally make the column not-null. On the

Parsing libpq PQtrace files

2023-10-17 Thread Dominique Devienne
Hi. I'm tracing my client-side connection(s) for the first time. The format seems to be line oriented. Selected text columns with embedded newlines have those newlines encoded as \x0a to remain single-line in the trace. So far so good. But then on Parse, the query text, which also contains embedd

Re: Parsing libpq PQtrace files

2023-10-17 Thread Alvaro Herrera
On 2023-Oct-17, Dominique Devienne wrote: > But then on Parse, the query text, which also contains embedded > newlines but also embedded double-quotes, for column aliases, or table > names, or whatever, even why not a single char literal like '"' (i.e. > single-quote, double-quote, single-quote),

Re: Parsing libpq PQtrace files

2023-10-17 Thread Dominique Devienne
On Tue, Oct 17, 2023 at 6:12 PM Alvaro Herrera wrote: > On 2023-Oct-17, Dominique Devienne wrote: > > > But then on Parse, the query text, which also contains embedded > > newlines but also embedded double-quotes, for column aliases, or table > > names, or whatever, even why not a single char lit

Index based search have issues with 11.20

2023-10-17 Thread Hafeez Rahim
Hi This is to check regarding an issue we came across on postgreSQL community version 11 with minor patch 11.20 along with few other changes change details mention on end part of this mail The issue is notice after the minor patching from postgreSQL 11.16 to 11.20 The particular database runs on

RE: Postgresql HA cluster

2023-10-17 Thread Jason Grammenos
Hello Jehan-Guillaume de Rorthais Perhaps you could help me understand a few things better about how primary-standby works in postgresql with streaming replication. If you have 2 PostgreSQL nodes hooked up to a Load balancer (haproxy), and you move take node1 out of load balancing, you now have

Re: Index based search have issues with 11.20

2023-10-17 Thread Tom Lane
Hafeez Rahim writes: > Issue : > One of the table query not woks when string values are filtered with = > clause > where as the query works with like clause using '%' flag or using > trim(column) > below are query examples describes the problem You've not really provided enough detail, but I'm

Re: Index based search have issues with 11.20

2023-10-17 Thread Adrian Klaver
On 10/17/23 11:24, Hafeez Rahim wrote: Hi This is to check regarding an issue we came across on postgreSQL community version 11 with minor patch 11.20 along with few other changes change details mention on end part of this mail The issue is notice after the minor patching from postgreSQL 11.

Inheritance in PostgreSQL

2023-10-17 Thread Luis Bruno
Hello, I'm in the process of developing a basic database structure that utilizes inheritance as part of a test for my work. The database consists of two tables: ‘PERSON' and ‘CUSTOMER' with the ‘PERSON' table serving as the parent table for ‘CUSTOMER' . Initially, I defined the 'CREATE TABLE' stat

Re: Inheritance in PostgreSQL

2023-10-17 Thread David G. Johnston
On Tue, Oct 17, 2023 at 2:49 PM Luis Bruno wrote: > I'm particularly interested in the advantages of the inheritance concept > in PostgreSQL > There really are none nowadays and the entire feature should be avoided, IMO. No one else has tried to implement it in their engines for good reasons.

Re: Inheritance in PostgreSQL

2023-10-17 Thread Ron
On 10/17/23 16:42, Luis Bruno wrote: Hello, I'm in the process of developing a basic database structure that utilizes inheritance as part of a test for my work. The database consists of two tables: ‘PERSON' and ‘CUSTOMER' with the ‘PERSON' table serving as the parent table for ‘CUSTOMER' .

RE: Inheritance in PostgreSQL

2023-10-17 Thread Jeff Laing
“Don’t use table inheritance” IS on that page From: David G. Johnston Also of note: https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_varchar.28n.29_by_default

Re: Inheritance in PostgreSQL

2023-10-17 Thread David G. Johnston
On Tue, Oct 17, 2023 at 3:33 PM Jeff Laing wrote: > “Don’t use table inheritance” IS on that page > > > Indeed - oddly under "tool usage"...along with rules and, an actual tool, psql -W David J.

Need efficient way to remove (almost) duplicate rows from a table

2023-10-17 Thread David Gauthier
v11.5 on linux (I know, I know, IT is working on the upgrade to 15.2) I have a table with millions of records and there are a lot of "almost" duplicates that I want to get rid of in an efficient way. Best to illustrate with a simple example... We'll talk about deleting leaves on a tree where eac

Re: Need efficient way to remove (almost) duplicate rows from a table

2023-10-17 Thread Ron
https://dba.stackexchange.com/a/138327/63913 On 10/17/23 17:48, David Gauthier wrote: v11.5 on linux (I know, I know, IT is working on the upgrade to 15.2) I have a table with millions of records and there are a lot of "almost" duplicates that I want to get rid of in an efficient way.  Best to

Re: Need efficient way to remove (almost) duplicate rows from a table

2023-10-17 Thread Paul Jungwirth
On 10/17/23 15:48, David Gauthier wrote: I have a table with millions of records and there are a lot of "almost" duplicates that I want to get rid of in an efficient way.  Best to illustrate with a simple example... This sounds like a classic use-case for a "correlated subquery". Assuming you

Re: Inheritance in PostgreSQL

2023-10-17 Thread Merlin Moncure
On Tue, Oct 17, 2023 at 5:36 PM Jeff Laing wrote: > “Don’t use table inheritance” IS on that page > Yeah, inheritance probably would have been removed a long time ago except that it was underneath the partitioning feature. The basic idea of implementing polymorphic record storage essentially ha

Fwd: Need efficient way to remove (almost) duplicate rows from a table

2023-10-17 Thread Michael Nolan
I'm not clear which rows are duplicates. It looks like limb_id, branch_id and twig_id make up a unique key. If there was a row (2, 2, 7,103.7) would it be a duplicate of rows (1,1,2,103.7) and (1,1,3,103.7)? -- MIke Nolan

Partition Lock Issue

2023-10-17 Thread Saravanan P K
I have a postgres database shared by two applications A and B. A is used often (data centric) and B is used once in a while to create customers (only for this purpose and nothing else) for Application A. When a customer is created in application B, monthly partitions are created for the next 3 yea