public inbox for [email protected]
help / color / mirror / Atom feedRe: Error while updating a table
7+ messages / 5 participants
[nested] [flat]
* Re: Error while updating a table
@ 2025-04-18 11:20 [email protected] <[email protected]>
2025-04-19 12:38 ` Re: Error while updating a table [email protected] <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: [email protected] @ 2025-04-18 11:20 UTC (permalink / raw)
To: pgsql-general; Laurenz Albe <[email protected]>
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 <[email protected]> wrote:
On Fri, 2025-04-18 at 07:31 +0000, [email protected] 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 PostgreSQL log.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Error while updating a table
2025-04-18 11:20 Re: Error while updating a table [email protected] <[email protected]>
@ 2025-04-19 12:38 ` [email protected] <[email protected]>
2025-04-19 12:55 ` Re: Error while updating a table Laurenz Albe <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: [email protected] @ 2025-04-19 12:38 UTC (permalink / raw)
To: pgsql-general; Laurenz Albe <[email protected]>
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, [email protected] <[email protected]> wrote:
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 <[email protected]> wrote:
On Fri, 2025-04-18 at 07:31 +0000, [email protected] 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 PostgreSQL log.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Error while updating a table
2025-04-18 11:20 Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:38 ` Re: Error while updating a table [email protected] <[email protected]>
@ 2025-04-19 12:55 ` Laurenz Albe <[email protected]>
2025-04-19 13:06 ` Re: Error while updating a table [email protected] <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Laurenz Albe @ 2025-04-19 12:55 UTC (permalink / raw)
To: [email protected] <[email protected]>; pgsql-general
On Sat, 2025-04-19 at 12:38 +0000, [email protected] 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 sunset,
say a prayer to Bill Gates, then reboot again.
No, seriously: randomly messing around with your machine rarely ever
gets you closer to a solution.
If you get the error
current transaction is aborted, commands ignored until end of transaction block
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 are sure to catch that error.
Also, if "log_min_messages" is "warning" (the default) or "error", you
will find the error in the PostgreSQL log. That's all I can say to you.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Error while updating a table
2025-04-18 11:20 Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:38 ` Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:55 ` Re: Error while updating a table Laurenz Albe <[email protected]>
@ 2025-04-19 13:06 ` [email protected] <[email protected]>
2025-04-19 13:14 ` Re: Error while updating a table David G. Johnston <[email protected]>
2025-04-19 19:42 ` Re: Error while updating a table Peter J. Holzer <[email protected]>
0 siblings, 2 replies; 7+ messages in thread
From: [email protected] @ 2025-04-19 13:06 UTC (permalink / raw)
To: pgsql-general; Laurenz Albe <[email protected]>
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's executed from the application. Unfortunately, that option was not set at that time. Even I enable it now, I can't figure out that error. By any chance, if I get that statement, what should I do? What are the Steps (or documentation) to correct this issue?
Happiness Always
BKR Sivaprakash
On Saturday 19 April, 2025 at 06:25:37 pm IST, Laurenz Albe <[email protected]> wrote:
On Sat, 2025-04-19 at 12:38 +0000, [email protected] 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 sunset,
say a prayer to Bill Gates, then reboot again.
No, seriously: randomly messing around with your machine rarely ever
gets you closer to a solution.
If you get the error
current transaction is aborted, commands ignored until end of transaction block
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 are sure to catch that error.
Also, if "log_min_messages" is "warning" (the default) or "error", you
will find the error in the PostgreSQL log. That's all I can say to you.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Error while updating a table
2025-04-18 11:20 Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:38 ` Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:55 ` Re: Error while updating a table Laurenz Albe <[email protected]>
2025-04-19 13:06 ` Re: Error while updating a table [email protected] <[email protected]>
@ 2025-04-19 13:14 ` David G. Johnston <[email protected]>
2025-04-19 13:24 ` =?gb18030?B?u9i4tKO6IEVycm9yIHdoaWxlIHVwZGF0aW5nIGEg?= =?gb18030?B?dGFibGU=?= =?gb18030?B?QW5keSBIdWFuZw==?= <[email protected]>
1 sibling, 1 reply; 7+ messages in thread
From: David G. Johnston @ 2025-04-19 13:14 UTC (permalink / raw)
To: [email protected] <[email protected]>; +Cc: pgsql-general; Laurenz Albe <[email protected]>
On Sat, Apr 19, 2025 at 6:06 AM [email protected] <
[email protected]> 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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* =?gb18030?B?u9i4tKO6IEVycm9yIHdoaWxlIHVwZGF0aW5nIGEg?= =?gb18030?B?dGFibGU=?=
2025-04-18 11:20 Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:38 ` Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:55 ` Re: Error while updating a table Laurenz Albe <[email protected]>
2025-04-19 13:06 ` Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 13:14 ` Re: Error while updating a table David G. Johnston <[email protected]>
@ 2025-04-19 13:24 ` =?gb18030?B?QW5keSBIdWFuZw==?= <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: =?gb18030?B?QW5keSBIdWFuZw==?= @ 2025-04-19 13:24 UTC (permalink / raw)
To: =?gb18030?B?RGF2aWQgRy4gSm9obnN0b24=?= <[email protected]>; =?gb18030?B?c2l2YXBvc3RncmVzQHlhaG9vLmNvbQ==?= <[email protected]>; +Cc: pgsql-general; =?gb18030?B?TGF1cmVueiBBbGJl?= <[email protected]>
I suggest to correct you application code first to log this error out in your application, the following picture is our code which can catch these kind of issue, and log it in the application log files.
------------------ 原始邮件 ------------------
发件人: "David G. Johnston" <[email protected]>;
发送时间: 2025年4月19日(星期六) 晚上9:14
收件人: "[email protected]"<[email protected]>;
抄送: "Pgsql-general"<[email protected]>;"Laurenz Albe"<[email protected]>;
主题: Re: Error while updating a table
On Sat, Apr 19, 2025 at 6:06 AM [email protected] <[email protected]> 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.
Attachments:
[application/octet-stream] [email protected] (107.1K, [email protected])
download
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Error while updating a table
2025-04-18 11:20 Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:38 ` Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:55 ` Re: Error while updating a table Laurenz Albe <[email protected]>
2025-04-19 13:06 ` Re: Error while updating a table [email protected] <[email protected]>
@ 2025-04-19 19:42 ` Peter J. Holzer <[email protected]>
1 sibling, 0 replies; 7+ messages in thread
From: Peter J. Holzer @ 2025-04-19 19:42 UTC (permalink / raw)
To: [email protected]
On 2025-04-19 13:06:27 +0000, [email protected] 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 are sure to catch that error.
>
> There is an option to log every sql statement that's executed from the
> application. Unfortunately, that option was not set at that time.
You don't have to log every sql statement. Just the ones which cause
errors. As Laurenz mentioned, that happens automatically with the
default settings.
> Even I enable it now, I can't figure out that error.
Just search the logs for the string "ERROR".
> By any chance, if I get that statement, what should I do?
1) Read the error message.
2) Figure out what caused the error
3) Fix the problem
hjp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2025-04-19 19:42 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-18 11:20 Re: Error while updating a table [email protected] <[email protected]>
2025-04-19 12:38 ` [email protected] <[email protected]>
2025-04-19 12:55 ` Laurenz Albe <[email protected]>
2025-04-19 13:06 ` [email protected] <[email protected]>
2025-04-19 13:14 ` David G. Johnston <[email protected]>
2025-04-19 13:24 ` =?gb18030?B?u9i4tKO6IEVycm9yIHdoaWxlIHVwZGF0aW5nIGEg?= =?gb18030?B?dGFibGU=?= =?gb18030?B?QW5keSBIdWFuZw==?= <[email protected]>
2025-04-19 19:42 ` Peter J. Holzer <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox