RE: error “server process was terminated by signal 11: Segmentation fault” running pg_create_logical_replication_slot using pgoutput plugin

2025-07-09 Thread Hayato Kuroda (Fujitsu)
Dear Shlok, Abrahim, > Also, I was going to the logs on found: > > > < 2025-07-08 14:57:08.653 UTC psql postgres postgres 172.18.0.94(53414) > SELECT 0 2025-07-08 14:57:07 UTC 1096 686d31c3.448 2025-07-08 > 14:57:08.653 UTC > LOG: Initializing CDC decoder > > This log is not present in Postg

Re: PostgresSQL Setup error

2025-07-09 Thread Adrian Klaver
and following the steps accordingly with regards to adding the details for PostgreSQL Unicode ODBC Driver and testing, I run into an error where it states the below. *note - I was provided with the username and password . "psql: FATAL: password authentication failed" Was that th

Re: PostgresSQL Setup error

2025-07-09 Thread Laurenz Albe
On Wed, 2025-07-09 at 14:06 +, Jordan Adams wrote: > "psql: FATAL: password authentication failed" > > Please advise if assistance can be provided? Possibly. That error will cause an error message in the PostgreSQL server log. Ask your DBA to find that error message a

PostgresSQL Setup error

2025-07-09 Thread Jordan Adams
regards to adding the details for PostgreSQL Unicode ODBC Driver and testing, I run into an error where it states the below. *note - I was provided with the username and password . "psql: FATAL: password authentication failed" Please advise if assistance can be provided? Kind Regar

Re: error “server process was terminated by signal 11: Segmentation fault” running pg_create_logical_replication_slot using pgoutput plugin

2025-07-09 Thread Shlok Kyal
On Wed, 9 Jul 2025 at 12:19, Shlok Kyal wrote: > > On Wed, 9 Jul 2025 at 11:43, abrahim abrahao wrote: > > > > I got error “server process was terminated by signal 11: Segmentation > > fault” using pg_create_logical_replication_slot with pgoutput plugin > > par

Re: error “server process was terminated by signal 11: Segmentation fault” running pg_create_logical_replication_slot using pgoutput plugin

2025-07-08 Thread Shlok Kyal
On Wed, 9 Jul 2025 at 11:43, abrahim abrahao wrote: > > I got error “server process was terminated by signal 11: Segmentation fault” > using pg_create_logical_replication_slot with pgoutput plugin parameter and > using test_decoding worked fine, any idea that is wrong? > >

error “server process was terminated by signal 11: Segmentation fault” running pg_create_logical_replication_slot using pgoutput plugin

2025-07-08 Thread abrahim abrahao
I got error “server process was terminated by signal 11: Segmentation fault” using pg_create_logical_replication_slot with pgoutput plugin parameter and using test_decoding worked fine, any idea that is wrong? Note: I am using docker container and I also updated shm-size from 1024mb to 2g and

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

2025-06-17 Thread Masahiko Sawada
On Wed, Jun 11, 2025 at 7:36 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Max, > > > We have rewritten as many of our transactions as possible to avoid using > > temporary tables, and so far, that seems to have resolved the problem. > > Good to know. We try to fix as soon as possible. > I pushed th

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread David G. Johnston
On Mon, Jun 16, 2025, 10:21 Adrian Klaver wrote: > On 6/16/25 09:29, adolfo flores wrote: > > Hello Team, > > > > I hope you can help me with an issue we're experiencing. We have an app > > running on Kubernetes that opens a huge number of connections within a > > couple of seconds. > > > > The d

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Adrian Klaver
On 6/16/25 11:09 AM, David G. Johnston wrote: I am not understanding the above. The connection limit from the database side is going to be the value for max_connections. It is not clear to me what "...  connection limit of 30% of the max_connections setting" is refer

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Marco Torres
You might want to explore pgpool and pgbouncer. Depending in your use case you might want to glue them togeter. On Mon, Jun 16, 2025, 10:39 AM Tom Lane wrote: > adolfo flores writes: > > I hope you can help me with an issue we're experiencing. We have an app > > running on Kubernetes that opens

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Adrian Klaver
On 6/16/25 09:29, adolfo flores wrote: Hello Team, I hope you can help me with an issue we're experiencing. We have an app running on Kubernetes that opens a huge number of connections within a couple of seconds. The database that the app connects to, is configured with a connection limit o

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Richard Welty
a coding error i've seen from inexperienced devs with little database experience is inattentiveness to how the DB connections were being opened. last time i saw this, a smart young dev with no DB background did not understand the cost of opening connections and had on the order of 30 php

Re: Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread Tom Lane
adolfo flores writes: > I hope you can help me with an issue we're experiencing. We have an app > running on Kubernetes that opens a huge number of connections within a > couple of seconds. You need to fix that app to be less unfriendly, or maybe put it behind a connection pooler. > Is it expect

Getting error "too many clients already" despite having a db connection limit set

2025-06-16 Thread adolfo flores
Hello Team, I hope you can help me with an issue we're experiencing. We have an app running on Kubernetes that opens a huge number of connections within a couple of seconds. The database that the app connects to, is configured with a connection limit of 30% of the max_connections setting. Despite

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-16 Thread Rachel Roch
15 Jun 2025, 17:15 by adrian.kla...@aklaver.com: > > It is redundant for fgrep. > Talk about muscle memory !  How many years have I still been typing fgrep -F thinking I was typing grep -F !

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-15 Thread Adrian Klaver
On 6/15/25 08:15, Adrian Klaver wrote: On 6/15/25 01:06, Rachel Roch wrote: 14 Jun 2025, 16:21 by adrian.kla...@aklaver.com: Isn't fgrep -F redundant? As I understand it fgrep = grep -F You have the wrong end of the stick. ;-) Don't think so, the -F is redundant. It is redundant for

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-15 Thread Adrian Klaver
On 6/15/25 01:06, Rachel Roch wrote: 14 Jun 2025, 16:21 by adrian.kla...@aklaver.com: Isn't fgrep -F redundant? As I understand it fgrep = grep -F You have the wrong end of the stick. ;-) Don't think so, the -F is redundant. Try grep -F then fgrep and then fgrep -F on the same file.

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-15 Thread Rachel Roch
14 Jun 2025, 16:21 by adrian.kla...@aklaver.com: > > Isn't fgrep -F redundant? As I understand it fgrep = grep -F > You have the wrong end of the stick. ;-) As per Grep 3.8 release notes (https://lists.gnu.org/archive/html/info-gnu/2022-09/msg1.html): "The egrep and fgrep commands, whic

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-14 Thread Adrian Klaver
bject, its name and the owner. The error message and your first example above show that the command is there. See at here: https://www.postgresql.org/docs/current/app-pgrestore.html in the Examples section how you can comment out the line. Then you could use -L to feed the list back to pg_r

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-14 Thread Rachel Roch
13 Jun 2025, 20:13 by adrian.kla...@aklaver.com: > > To get at an editable script you can do something like: > > pg_restore -f my_database_txt.sql my_database.dump > > This will give you a plain text version of the dump that you can feed back to > psql to load into remote database. > Thanks

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-13 Thread Adrian Klaver
On 6/13/25 11:23, Tom Lane wrote: Rachel Roch writes: This is the error I am seeing: pg_restore: error: could not execute query: ERROR: permission denied to change default privilegesCommand was: ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT

pg_restore ERROR: permission denied to change default privileges

2025-06-13 Thread Rachel Roch
abase > my_database.dump I am attempting to restore it using the proxy admin user provided by the cloud provider: pg_restore -d "host=foobar.example.com port=12345 user=my_cloud_admin_user sslrootcert=/path/to/the/cert.crt sslmode=require dbname=my_database" -O -1  my_database.dump This

Re: pg_restore ERROR: permission denied to change default privileges

2025-06-13 Thread Tom Lane
Rachel Roch writes: > This is the error I am seeing: > pg_restore: error: could not execute query: ERROR: permission denied to > change default privilegesCommand was: ALTER DEFAULT PRIVILEGES FOR ROLE > "postgres" IN SCHEMA "public" GRANT SELECT ON TABLES TO &qu

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

2025-06-11 Thread Hayato Kuroda (Fujitsu)
Dear Max, > We have rewritten as many of our transactions as possible to avoid using > temporary tables, and so far, that seems to have resolved the problem. Good to know. We try to fix as soon as possible. Sorry for inconvenience. Best regards, Hayato Kuroda FUJITSU LIMITED

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

2025-06-11 Thread Max Madden
s with memory allocation errors like: > > > > ``` > > 2025-06-10 14:14:56.800 UTC [299] ERROR: could not receive data from WAL > stream: ERROR: invalid memory alloc request size 1238451248 > > 2025-06-10 14:14:56.805 UTC [1] LOG: background worker "logical > replication worker

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

2025-06-10 Thread Hayato Kuroda (Fujitsu)
6-10 14:14:56.800 UTC [299] ERROR: could not receive data from WAL > stream: ERROR: invalid memory alloc request size 1238451248 > 2025-06-10 14:14:56.805 UTC [1] LOG: background worker "logical replication > worker" (PID 299) exited with exit code 1 > ``` I think this

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

2025-06-10 Thread Max Madden
r 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 [299] ERROR: could not receive data from WAL stream: ERROR: invalid memory alloc request size 1238451248 2025-06-

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669‏

2025-05-10 Thread איתי זרחוביץ
le to > figure out to get it running too. > > The error message you originally shared isn't a Postgres issue but a macOS > issue. > > On Fri, May 9, 2025, at 1:57 PM, איתי זרחוביץ wrote: > > Ok > So, in order to install it well, what are the steps that i need to t

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669‏

2025-05-10 Thread איתי זרחוביץ
gt; you before I saw), as otherwise the response only goes to me directly and > nobody else can follow along or help you. > > After a quick online search it seems that this error means you don't have > Rosetta installed, this is the emulation layer that Apple provides to run > A

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669‏

2025-05-08 Thread Philipp Defner
Go to https://postgresapp.com/downloads.html, download the app, install and connect to the running instance with your Postgres GUI client of choice. If it's an important part of your studies you should be able to figure out to get it running too. The error message you originally shared is

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669‏

2025-05-08 Thread Philipp Defner
Hey, please use "Reply All" when you reply (As someone else already told you before I saw), as otherwise the response only goes to me directly and nobody else can follow along or help you. After a quick online search it seems that this error means you don't have Rosetta install

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669‏

2025-05-08 Thread Philipp Defner
Hey, you'll need to give a bit more information here. How did you install Postgres and what are you doing to see this error message? There's multiple ways recommended on https://www.postgresql.org/download/macosx/, personally I'd give Postgres.app a. try or the installation via

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669

2025-05-08 Thread Adrian Klaver
On 5/8/25 12:41, איתי זרחוביץ wrote: You need to remember to hit Reply All so the list is included in the conversation. Ccing list I tried before a hour to download Try now and see what happens. Also try the postgres.app link I posted previously. -- Adrian Klaver adrian.kla...@aklaver

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669

2025-05-08 Thread Adrian Klaver
On 5/8/25 12:02, איתי זרחוביץ wrote: Reply to list also: Ccing list. I tried to download from this link: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads <https://www.enterprisedb.com/downloads/postgres-postgresql-downloads> and than i got the

Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669

2025-05-08 Thread Adrian Klaver
On 5/8/25 05:17, איתי זרחוביץ wrote: ,Hello I have a MacBook with an M4 chip. I tried installing PostgreSQL version 17.5, but after the installation, I received the following error | _LSOpenURLsWithCompletionHandler() failed with error -10669 (1) .and the application fails to launch A

Re: Error in DROP TABLESPACE

2025-05-07 Thread Laurenz Albe
On Wed, 2025-05-07 at 08:16 +, Fagnani Gabriele G (GDS I&TS) wrote: > INTERNAL ? > I've run into an odd problem - I have what seems to be a "zombie" tablespace > that PostgreSQL won't let me drop, but nothing inside it is active. >   > drop tabl

Error in DROP TABLESPACE

2025-05-07 Thread
INTERNAL Hi, I've run into an odd problem - I have what seems to be a "zombie" tablespace that PostgreSQL won't let me drop, but nothing inside it is active. drop tablespace ts_idx_wb2; ERROR: tablespace "ts_idx_wb2" is not emp

Re: an error message that I don't understand

2025-05-02 Thread David G. Johnston
On Fri, May 2, 2025 at 1:25 PM Martin Mueller < martinmuel...@northwestern.edu> wrote: > > table tid from new index tuple (32586,21) overlaps with invalid duplicate > tuple at offset 120 of block 4398 in index "aacorrections_tcpreading_idx" > Read that as "your index is corrupted". > I have no

an error message that I don't understand

2025-05-02 Thread Martin Mueller
I get this error message: table tid from new index tuple (32586,21) overlaps with invalid duplicate tuple at offset 120 of block 4398 in index "aacorrections_tcpreading_idx" from an update query of the update table 1 set columnx = ‘yes’ where table1.xmlid in (select xmlid from table

Re: SQL ERROR subquery uses ungrouped column in PostgreSQL

2025-04-30 Thread David Rowley
On Thu, 1 May 2025 at 00:29, PALAYRET Jacques wrote: > => In the subquery, the semantic analysis of the query considers the column " > dat " instead of the expression " to_char(dat,'mm') ", which is actually > a grouped column. > Is this normal? How can I simply resolve the problem? Calcula

SQL ERROR subquery uses ungrouped column in PostgreSQL

2025-04-30 Thread PALAYRET Jacques
Hello, I have an unexpected error in my following query (of course, the query has been simplified here to request help): SELECT num_poste, to_char(dat, 'MM')::integer dat, CASE FLOOR((TO_NUMBER(TO_CHAR(dat,'DD'),'99')-1)/10) WHEN 0 THEN 1 WHEN 1 THEN 2 ELSE

Re: Upsert error "column reference is ambiguous"

2025-04-29 Thread David G. Johnston
On Tuesday, April 29, 2025, Tim Starling wrote: > > > This is a public interface and there may be callers in code that I don't > have access to. > You might help your cause by sharing examples of how client code uses your driver to perform upsert that runs into this limitation. David J.

Re: Upsert error "column reference is ambiguous"

2025-04-29 Thread Tom Lane
David Rowley writes: > Another thought is that you can have an UPDATE with a RETURNING > clause. An unqualified column defaults to NEW even though you could > argue it's ambiguous due to OLD (as of 80feb727c). Likely we were > forced into making it work that way through not wanting to force > ever

Re: Upsert error "column reference is ambiguous"

2025-04-29 Thread David Rowley
n a; select * from a1 where a in(select a from a2); -- silently returns unexpected results. If the original author of that query had been thoughtful enough to qualify the column in the subquery then someone would probably have gotten an error and fixed it. The moral of that story is that sometimes f

Re: Upsert error "column reference is ambiguous"

2025-04-29 Thread Tim Starling
On 29/4/25 16:36, Laurenz Albe wrote: On Tue, 2025-04-29 at 08:36 +1000, Tim Starling wrote: My code would be like function upsert( $table, $names, $values, $key, $set ) { if ( $this->type === 'mysql' ) { $conflict = 'ON DUPLICATE KEY UPDATE'; } else { $conflict

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Laurenz Albe
On Tue, 2025-04-29 at 08:36 +1000, Tim Starling wrote: > My code would be like > > function upsert( $table, $names, $values, $key, $set ) { > if ( $this->type === 'mysql' ) { > $conflict = 'ON DUPLICATE KEY UPDATE'; > } else { > $conflict = "ON CONFLICT ($key) DO UPDATE

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Christophe Pettus
> On Apr 28, 2025, at 15:58, Christophe Pettus wrote: > It does require knowing which of the VALUES is the key value being inserted > (pseudocode syntax above) [...] The instant after I hit send, I realized that information is available to the function by lining up the $names and $values arr

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Christophe Pettus
> On Apr 28, 2025, at 15:36, Tim Starling wrote: > function upsert( $table, $names, $values, $key, $set ) { >if ( $this->type === 'mysql' ) { >$conflict = 'ON DUPLICATE KEY UPDATE'; >} else { >$conflict = "ON CONFLICT ($key) DO UPDATE SET"; >} >return $this->quer

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Tim Starling
On 28/4/25 23:30, Peter Geoghegan wrote: You can use an alias for the target table name. Is it feasible to require callers to prefix all field names with a generic table name alias? No, primarily because MySQL does not support such an alias. -- Tim Starling

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Tim Starling
On 28/4/25 23:54, Tom Lane wrote: AFAIK, "ON CONFLICT" is a Postgres-ism. Exactly which constructs in exactly which other databases are you citing as precedent? There's a list here: Since that page was written in 201

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread David G. Johnston
On Monday, April 28, 2025, Tom Lane wrote: > > AFAIK, "ON CONFLICT" is a Postgres-ism. Exactly which constructs > in exactly which other databases are you citing as precedent? > I confirmed the SQLite reference from the original email. “The upsert above inserts the new vocabulary word "jovial"

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Tom Lane
Tim Starling writes: > On 28/4/25 20:54, Tom Lane wrote: >> Even if I were on board with arbitrarily adopting one of the two >> possible interpretations, it's far from obvious to me that most people >> would agree that "v" should mean the value from the existing row, >> rather than the new value.

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Peter Geoghegan
On Mon, Apr 28, 2025 at 12:56 AM Tim Starling wrote: > Our application has an upsert method which takes the assignment > "v=v+1" as a string. It is feasible to split it on the equals sign > into the destination field and expression components, but it is not > feasible to parse the expression or to

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Laurenz Albe
On Mon, 2025-04-28 at 21:22 +1000, Tim Starling wrote: > On 28/4/25 20:54, Tom Lane wrote: > > Even if I were on board with arbitrarily adopting one of the two > > possible interpretations, it's far from obvious to me that most people > > would agree that "v" should mean the value from the existing

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Tim Starling
On 28/4/25 20:54, Tom Lane wrote: Even if I were on board with arbitrarily adopting one of the two possible interpretations, it's far from obvious to me that most people would agree that "v" should mean the value from the existing row, rather than the new value. Better to make them say which the

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Tom Lane
Tim Starling writes: > Regarding upsert syntax. > => INSERT INTO t VALUES (1,1) ON CONFLICT (k) DO UPDATE SET v=v+1; > ERROR: column reference "v" is ambiguous > Please convince me that this is not a bug. It's not a bug. > If I understand correctly, in the

Re: Upsert error "column reference is ambiguous"

2025-04-27 Thread David G. Johnston
On Sunday, April 27, 2025, Tim Starling wrote: > thus allowing it to DWIM. We intentionally choose (or, in any case have established) a SWYM approach here. Personally I’d be fine with the reduced helpfulness in trying to prevent buggy queries in the interest of being more conforming with the b

Upsert error "column reference is ambiguous"

2025-04-27 Thread Tim Starling
O UPDATE SET v=v+1; ERROR: column reference "v" is ambiguous Please convince me that this is not a bug. If I understand correctly, in the expression "v+1", both EXCLUDED.v and t.v are present as the unqualified name "v". This is always the case and it is never

Re: [EXTERNAL] Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?

2025-04-21 Thread Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]
0771 edmund.j.man...@nasa.gov<mailto:edmund.j.man...@nasa.gov> From: Martin Gainty Date: Friday, April 18, 2025 at 11:51 AM To: "Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" , "pgsql-gene...@postgresql.org" Subject: [EXTERNAL] Re: Why is an error not thrown w

Re: Error while updating a table

2025-04-19 Thread Peter J. Holzer
On 2025-04-19 13:06:27 +, sivapostg...@yahoo.com wrote: > Thanks Laurenz, > > it is 100% clear that an earlier statement in the same transaction must > > have got an error. Write your application so that it logs *every* error > > that comes from the database, then you a

Re: Error while updating a table

2025-04-19 Thread David G. Johnston
On Sat, Apr 19, 2025 at 6:06 AM sivapostg...@yahoo.com < sivapostg...@yahoo.com> wrote: > By any chance, if I get that statement, what should I do? > Read it. What are the Steps (or documentation) to correct this issue? > > Impossible to say until the statement is read. David J.

Re: Error while updating a table

2025-04-19 Thread sivapostg...@yahoo.com
Thanks Laurenz, > it is 100% clear that an earlier statement in the same transaction musthave >got an error.  Write your application so that it logs *every* error that comes from the database, then you are sure to catch that error. There is an option to log every sql statement that'

Re: Error while updating a table

2025-04-19 Thread Laurenz Albe
On Sat, 2025-04-19 at 12:38 +, sivapostg...@yahoo.com wrote: > So far, I couldn't find the query that caused the error.   Is there any way > to unlock it?   > > Re-start, Format and fresh install of windows, etc. ? On Windows you have to reboot, bow three times toward sun

Re: Error while updating a table

2025-04-19 Thread sivapostg...@yahoo.com
So far, I couldn't find the query that caused the error.   Is there any way to unlock it?   Re-start, Format and fresh install of windows, etc. ? Happiness Always BKR Sivaprakash On Friday 18 April, 2025 at 04:50:52 pm IST, sivapostg...@yahoo.com wrote: If the query caused an

Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?

2025-04-18 Thread Martin Gainty
#x27; }); async function executeQuery(sql) { const client = await pool.connect(); try { const result = await client.query(sql, { timeout: 5000 }); // Timeout after 5 seconds return result; } catch (err) { console.error('Error executing query:', err); throw err; // Re-throw to propagate

Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?

2025-04-18 Thread Tom Lane
ation "sum_partn_alloc" > The Postgres server (12.22), running on RHEL 8.10 is configured with a > default lock timeout of 1 sec. > Why is Postgres not throwing an error when the ShareLock time has exceeded 1 > sec. ? I think you have misread the description of deadlock_t

Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?

2025-04-18 Thread Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]
n be just a single number, or a long list of numbers (20-50 or so). Normally, this SQL is executed without problem thousands of times a day. Then, we see at certain times when that SQL exceeds the timeout for the ShareLock on the transaction. No error is thrown from the DB and processing on t

Re: Error while updating a table

2025-04-18 Thread sivapostg...@yahoo.com
If the query caused an error Does it mean that other reasons might also be there? Nevertheless, I'll check the log file to find the query... Happiness Always BKR Sivaprakash On Friday 18 April, 2025 at 03:53:06 pm IST, Laurenz Albe wrote: On Fri, 2025-04-18 at 07:31

Re: Error while updating a table

2025-04-18 Thread Laurenz Albe
On Fri, 2025-04-18 at 07:31 +, sivapostg...@yahoo.com wrote: > For the second part, how to identify that culprit query? If the query caused an error, and you left "log_min_messages" at the default setting, the error and the statement that caused it should be in the PostgreSQ

Re: Error while updating a table

2025-04-18 Thread sivapostg...@yahoo.com
4+1) on x86_64-pc-linux-gnu, compiled > by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit > > Suddenly, one system starts throwing an error while updating a record from > PowerBuilder. > The same update statement (window) works fine, when run from other computers.  > Error > oc

Re: Error while updating a table

2025-04-17 Thread Laurenz Albe
On Fri, 2025-04-18 at 05:49 +, sivapostg...@yahoo.com wrote: > We use PowerBuilder along with PostgreSQL. > > PostgreSQL 15.7 (Ubuntu 15.7-1.pgdg24.04+1) on x86_64-pc-linux-gnu, compiled > by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit > > Suddenly, one system starts

Re: Error while updating a table

2025-04-17 Thread sivapostg...@yahoo.com
Hello, We use PowerBuilder along with PostgreSQL. PostgreSQL 15.7 (Ubuntu 15.7-1.pgdg24.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Suddenly, one system starts throwing an error while updating a record from PowerBuilder.  The same update statement

Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

2025-03-22 Thread Tom Lane
in outer exception handler: %', sqlerrm; With that, the test shows regression=# call outer(); NOTICE: in outer exception handler: invalid transaction termination CALL What is happening is that inner() does PERFORM 1/0, fails and bounces out to its exception handler, and then the ROLLBACK throws an e

Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

2025-03-22 Thread Christophe Pettus
> On Mar 22, 2025, at 21:37, Kevin Stephenson wrote: > > Christophe and Tom, thank you for your responses, but I'm still a bit > confused. In my original email, the Test 2 case is allowing a ROLLBACK in the > EXCEPTION clause without throwing an error. Is it a NOP ROLLB

Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

2025-03-22 Thread Tom Lane
Kevin Stephenson writes: > Christophe and Tom, thank you for your responses, but I'm still a bit > confused. In my original email, the Test 2 case is allowing a ROLLBACK in the > EXCEPTION clause without throwing an error. Is it a NOP ROLLBACK being > applied to an aborted s

Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

2025-03-22 Thread Kevin Stephenson
Christophe and Tom, thank you for your responses, but I'm still a bit confused. In my original email, the Test 2 case is allowing a ROLLBACK in the EXCEPTION clause without throwing an error. Is it a NOP ROLLBACK being applied to an aborted subTX, a real full ROLLBACK, or something else? P

Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

2025-03-22 Thread Tom Lane
Christophe Pettus writes: > A procedure cannot issue top-level transaction control statements from within > an exception block, and attempting to do so raises the error you saw. This > includes procedures that are called from within an exception block. Yeah. Postgres doesn't h

Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

2025-03-22 Thread Christophe Pettus
exception block, and attempting to do so raises the error you saw. This includes procedures that are called from within an exception block.

Nested Stored Procedures - ERROR: invalid transaction termination 2D000

2025-03-22 Thread Kevin Stephenson
hen using structured exception handling in nested stored procedures with an autonomous TX workaround (for error logging), results in error 2D000 (see Test 3). Verbose logging shows it to be caused by function _SPI_rollback() at line 400 (16.4) or 399 (17.4) in spi.c. What seems inconsistent

Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Tom Lane
Luca Ferrari writes: > On Wed, Mar 12, 2025 at 12:54 PM Artur Zakirov wrote: >> In your case `base/357283/365810` file is a new index file. For some >> reason Postgres tries to read the new index. I suppose this is because >> during reading the table `t` within the function `f_t` it tries to >> a

Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Achilleas Mantzios - cloud
E. As I stated, this example is controversial, and as the documentation states, the IMMUTABLE set of functions should not perform database lookups, as in my example. However, the error message is quite obscure to me, and reminds me a disk corruption rather a stability/function/lookup problem. Te

Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Luca Ferrari
STABLE or > VOLATILE. As I stated, this example is controversial, and as the documentation states, the IMMUTABLE set of functions should not perform database lookups, as in my example. However, the error message is quite obscure to me, and reminds me a disk corruption rather a stability/function/lookup problem. Luca

Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Artur Zakirov
Hey, On Wed, 12 Mar 2025 at 10:11, Luca Ferrari wrote: > Now, according to the documentation, the function f_t is immutable > since it is not modifying the database, so what is going on? And why > is the same function working if the table has not the constraint on > the column? I can reproduce t

ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Luca Ferrari
; RETURN return_value; END $CODE$ LANGUAGE plpgsql IMMUTABLE; CREATE INDEX IF NOT EXISTS idx_tt ON tt( f_tt( pk ) ); CREATE INDEX IF NOT EXISTS idx_t ON t( f_t( pk ) ); The last index, created on table t throws the error: ERROR: could not read block 0 in file "base/357283/365810": r

Re: Error on query execution

2025-03-06 Thread Tom Lane
Igor Korot writes: > On Tue, Mar 4, 2025 at 8:37 PM Tom Lane wrote: >> ... but given that you didn't specify any data type, I think the >> parser will fall back to assuming that $1 is the same type as >> "abf_type", whatever that is. Passing data in binary is not at all >> forgiving about gettin

Re: Error on query execution

2025-03-06 Thread Igor Korot
CT * FROM abcatfmt WHERE abf_type = $1::smallint", 1, nullptr, paramValues, paramLengths, paramFormats, 1 ); results in: $1 = L"ERROR: incorrect binary data format in bind parameter 1\n" I am now at a complete loss. How do I fix the code so it will run? Thank you. > > regards, tom lane

Re: Error on query execution

2025-03-05 Thread Igor Korot
Tom, On Tue, Mar 4, 2025, 8:37 PM Tom Lane wrote: > Igor Korot writes: > > binaryIntVal = htonl( (uint32_t) type ); > > paramValues[0] = (char *) &binaryIntVal; > > paramLengths[0] = sizeof( binaryIntVal ); > > paramFormats[0] = 1; > > You're apparently trying to pass this param

Re: Error on query execution

2025-03-05 Thread Igor Korot
Hi, Tom, On Tue, Mar 4, 2025 at 8:37 PM Tom Lane wrote: > > Igor Korot writes: > > binaryIntVal = htonl( (uint32_t) type ); > > paramValues[0] = (char *) &binaryIntVal; > > paramLengths[0] = sizeof( binaryIntVal ); > > paramFormats[0] = 1; > > You're apparently trying to pass thi

Re: Error on query execution

2025-03-04 Thread Tom Lane
Igor Korot writes: > binaryIntVal = htonl( (uint32_t) type ); > paramValues[0] = (char *) &binaryIntVal; > paramLengths[0] = sizeof( binaryIntVal ); > paramFormats[0] = 1; You're apparently trying to pass this parameter as an int4 ... > res = PQexecParams( m_db, "SELECT * FRO

Error on query execution

2025-03-04 Thread Igor Korot
rrorMsg.push_back( L"Error executing query: " + err ); result = 1; } [/code] Running the above I'm getting: [quote] (gdb) p err $1 = L"ERROR: incorrect binary data format in bind parameter 1\n" [/quote] What is wrong and how do I fix it? Thank you.

Re: Error on the query

2025-03-04 Thread Igor Korot
T EXISTS( SELECT 1 FROM >> pg_class c, pg_namespace n WHERE n.oid = c.relnamespace AND c.relname >> = \'abcatc_x\' AND n.nspname = \'public\' ) THEN CREATE UNIQUE INDEX >> \"abcatc_x\" ON \"abcatcol\"(\"abc_tnam\" ASC, \"abc_

Re: Error on the query

2025-03-04 Thread David G. Johnston
EN CREATE UNIQUE INDEX > \"abcatc_x\" ON \"abcatcol\"(\"abc_tnam\" ASC, \"abc_ownr\" ASC, > \"abc_cnam\" ASC); END IF; END;" ); > [/code] > > What am I missing? > “ ERROR: unterminated dollar-quoted string at or near‘ The terminator for your dollar-quoted string. David J.

Re: Error on the query

2025-03-04 Thread Pavel Stehule
\'abcatc_x\' AND n.nspname = \'public\' ) THEN CREATE UNIQUE INDEX > \"abcatc_x\" ON \"abcatcol\"(\"abc_tnam\" ASC, \"abc_ownr\" ASC, > \"abc_cnam\" ASC); END IF; END;" ); > [/code] > > I got: > > [quote] > $

Error on the query

2025-03-04 Thread Igor Korot
"abcatc_x\" ON \"abcatcol\"(\"abc_tnam\" ASC, \"abc_ownr\" ASC, \"abc_cnam\" ASC); END IF; END;" ); [/code] I got: [quote] $4 = L"ERROR: unterminated dollar-quoted string at or near \"$$ BEGIN IF NOT EXISTS( SELECT 1 FROM pg_class c, pg_na

Re: Please implement a catch-all error handler per row, for COPY

2025-03-03 Thread Laurenz Albe
On Mon, 2025-03-03 at 07:14 +0330, me nefcanto wrote: > The point is, that there is already an `on_error ignore` clause there. This > means that > somewhere there is a try/catch per row. If I'm wrong, please let me know. The crucial point that Tom referred to is the "per row". What is a row? Im

Re: Please implement a catch-all error handler per row, for COPY

2025-03-02 Thread Adrian Klaver
On 3/2/25 19:44, me nefcanto wrote: Thank you all for responding. With respect, I don't understand why COPY gets related to ETL. All of the requirements I mentioned above have nothing to do with ETL. We have a table of categories. A hierarchical table. This is a multitenant app. Hundreds of tho

Re: Please implement a catch-all error handler per row, for COPY

2025-03-02 Thread Tom Lane
amp;h=d9f7f5d32 https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=9e2d87011 and a ton of related commits. It's possible that the specific case of unique-index violations could be handled in a similar style. But "catch any error whatever" is simply not going to

Re: Please implement a catch-all error handler per row, for COPY

2025-03-02 Thread Christophe Pettus
> On Mar 2, 2025, at 19:44, me nefcanto wrote: > > As I have specified in the bug thread, from 11 RDBMSs, 7 support this. Thus > it's not an uncommon weird request. If your organization is interested in producing a design and a patch, or paying a developer or organization to do so, that wou

Re: Please implement a catch-all error handler per row, for COPY

2025-03-02 Thread me nefcanto
Thank you all for responding. With respect, I don't understand why COPY gets related to ETL. All of the requirements I mentioned above have nothing to do with ETL. We have a table of categories. A hierarchical table. This is a multitenant app. Hundreds of thousands of records are in it. We want to

  1   2   3   4   5   6   7   8   9   10   >