RE: Logical Replication Memory Allocation Error - "invalid memory alloc request size"

2025-06-10 Thread Hayato Kuroda (Fujitsu)
Dear Max, Thanks for the report. > The initial snapshot and data copy complete successfully for all tables. > However, anywhere from 5 > minutes to 2 hours after the initial sync, the subscription consistently > fails with memory allocation errors like: > > ``` > 2025-06-10 14:14:56.800 UTC [29

Re: Is it correct to raise an exception in a domain check

2025-06-10 Thread Tom Lane
Logan Grosz writes: > I have a `DOMAIN` on `JSONB`. I need to verify the shape of the JSON, so I > have a check expression written in PL/pgSQL. The docs say >> Each constraint must be an expression producing a Boolean result > Would it be correct to raise an exception to indicate a failed > chec

Re: Is it correct to raise an exception in a domain check

2025-06-10 Thread Ron Johnson
On Tue, Jun 10, 2025 at 4:53 PM Logan Grosz wrote: > Hi, > > I have a `DOMAIN` on `JSONB`. I need to verify the shape of the JSON, so I > have a check expression written in PL/pgSQL. The docs say > > > Each constraint must be an expression producing a Boolean result > > Would it be correct to rai

Is it correct to raise an exception in a domain check

2025-06-10 Thread Logan Grosz
Hi, I have a `DOMAIN` on `JSONB`. I need to verify the shape of the JSON, so I have a check expression written in PL/pgSQL. The docs say > Each constraint must be an expression producing a Boolean result Would it be correct to raise an exception to indicate a failed check? I perform type-casts (

Re: pg_upgradecluster version 10 to 16 question

2025-06-10 Thread Adrian Klaver
On 6/10/25 13:14, Adrian Klaver wrote: On 6/10/25 13:01, Jim Cunning wrote: I had a Ubuntu 20.04 LTS system with a postgresql version 10 database, and the system became unbootable.  The database was stored in /var/lib/postgresql/10/main and I was able to recover the entire contents of the data

Re: pg_upgradecluster version 10 to 16 question

2025-06-10 Thread David G. Johnston
On Tue, Jun 10, 2025 at 1:01 PM Jim Cunning wrote: > I obviously no longer have a running version 10 server, > You will need to correct this lack if you want to make use of version 10 data files. David J.

Re: pg_upgradecluster version 10 to 16 question

2025-06-10 Thread Adrian Klaver
On 6/10/25 13:01, Jim Cunning wrote: I had a Ubuntu 20.04 LTS system with a postgresql version 10 database, and the system became unbootable.  The database was stored in /var/lib/postgresql/10/main and I was able to recover the entire contents of the data in that directory and below.  I now hav

pg_upgradecluster version 10 to 16 question

2025-06-10 Thread Jim Cunning
I had a Ubuntu 20.04 LTS system with a postgresql version 10 database, and the system became unbootable.  The database was stored in /var/lib/postgresql/10/main and I was able to recover the entire contents of the data in that directory and below.  I now have a system ru

Re: is pg_stat_activity "transactional"? How fast does it update?

2025-06-10 Thread Adrian Klaver
On 6/10/25 08:46, Dominique Devienne wrote: On Tue, Jun 10, 2025 at 4:27 PM Tom Lane wrote: Dominique Devienne writes: So when and how fast does pg_stat_activity update, in the face of a PQfinish? The shared state underlying pg_stat_activity is updated immediately when something changes. H

Re: is pg_stat_activity "transactional"? How fast does it update?

2025-06-10 Thread Dominique Devienne
On Tue, Jun 10, 2025 at 4:27 PM Tom Lane wrote: > Dominique Devienne writes: > > So when and how fast does pg_stat_activity update, in the face of a > > PQfinish? > > The shared state underlying pg_stat_activity is updated > immediately when something changes. However ... > > PQfinish is asynchr

Logical Replication Memory Allocation Error - "invalid memory alloc request size"

2025-06-10 Thread Max Madden
Hello, I'm encountering a consistent issue with PostgreSQL 15 logical replication and would appreciate any guidance on debugging or resolving this problem. *Setup:* - Source: PostgreSQL 15.x - Target: PostgreSQL 15.x - Replication: Logical replication using publication/subscription (pgoutput) - T

Re: is pg_stat_activity "transactional"? How fast does it update?

2025-06-10 Thread Tom Lane
Dominique Devienne writes: > So when and how fast does pg_stat_activity update, in the face of a > PQfinish? The shared state underlying pg_stat_activity is updated immediately when something changes. However ... PQfinish is asynchronous: it sends a "goodbye" message and then closes the connect

is pg_stat_activity "transactional"? How fast does it update?

2025-06-10 Thread Dominique Devienne
Hi. We're getting unit-test failures that look like data-races, which somehow are getting very frequent recently, tripping our CI. Basically we have a `services` table, for service discovery, which records the backend PID of its main DB Connection. Such that we can account for "stale" / "zombie"

Re: Feature request: Settings to disable comments and multiple statements in a connection

2025-06-10 Thread Laurenz Albe
On Tue, 2025-06-10 at 10:02 +0200, Dominique Devienne wrote: > On Thu, Jun 5, 2025 at 1:06 AM Tom Lane wrote: > > > Provide a client connection option (and/or implement the backend support) > > > to allow only one statement in an execute request > > > > This exists already; you just have to use

Re: Feature request: Settings to disable comments and multiple statements in a connection

2025-06-10 Thread Dominique Devienne
On Thu, Jun 5, 2025 at 1:06 AM Tom Lane wrote: > > Provide a client connection option (and/or implement the backend support) > > to allow only one statement in an execute request > > This exists already; you just have to use the extended query protocol. Hi Tom. Can you be more specific please? I