Re: Can't fix Pgsql Insert Command Issue.

From: Mark Kostevych <mkostevych(at)hwoodgroup(dot)com>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Jacob Shure <jacob(at)shurehw(dot)com>, Michael Green <Michael(at)hwoodgroup(dot)com>
Subject: Re: Can't fix Pgsql Insert Command Issue.
Date: 2024-09-23 13:33:22
Message-ID: DS0PR20MB5961CCB9FABCDA01E67A4F2CBE6F2@DS0PR20MB5961.namprd20.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

1) We didn't change anything on 09/20
2) We can't get any response while running pgsql command. It still shows running, no return any result.
3) I checked your link and attached result csv file here. Please check and let me know what you can find.
________________________________
From: Erik Wienhold <ewie(at)ewie(dot)name>
Sent: Monday, September 23, 2024 8:33 AM
To: Mark Kostevych <mkostevych(at)hwoodgroup(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org <pgsql-bugs(at)lists(dot)postgresql(dot)org>; Jacob Shure <jacob(at)shurehw(dot)com>; Michael Green <Michael(at)hwoodgroup(dot)com>
Subject: Re: Can't fix Pgsql Insert Command Issue.

On 2024-09-23 06:39 +0200, Mark Kostevych wrote:
> We are facing a critical issue while inserting our records to
> Postgresql Server. It was working well before but after 09/20, it
> failed, and we can't find what to fix.

1) What has changed on 09/20? Any triggers defined on table "checks"?

2) What error message do you get if the statement fails?

3) Or is the statement just hanging, judging by the attached screenshot?
The table or rows may be locked. The wiki should help you with that:
https://wiki.postgresql.org/wiki/Lock_Monitoring

> Here is a sample SQL Command for your reference.
> Insert INTO checks (id, name, number, status, sub_total, tax_total, total, mandatory_tip_amount, open_time, close_time, employee_name, employee_role_name, employee_id, employee, guest_count, type, type_id, taxed_type, table_name, location, zone, autograt_tax, trading_day_id, trading_day, updated_at, non_revenue_total, revenue_total, outstanding_balance, comp_total, voidcomp_reason_text, voidcomp_type, voidcomp_value) VALUES ($$d2a187a5-9c61-425c-a956-ca730437cdbd$$,$token$806$token$,1108,$$Closed$$,316.80,18.96,335.76,0.00,$$2024-09-20T12:32:10-07:00$$,$$2024-09-20T13:33:58-07:00$$,$$Kendall Rucks$$,$$Server$$,$$d014cf80-5ebb-45e7-a919-fc38a3b46be4$$,$$398007_Kendall_Bird Streets Club_Server$$,7,$$Table$$,1,$$exclusive$$,$$806$$,$$Bird Streets Club$$,$$Lounge$$,0.00,$$912b2778-822f-4586-ae3e-5970379867d2$$,$$2024-09-20$$,$$2024-09-20T20:33:58.000Z$$,0,316.8,0.00, 0, $$$$, $$$$, NULL), ($$fbe112aa-e59f-4345-9b66-86a693a795d7$$,$token$Test$token$,2919,$$Closed$$,0.00,0.00,0.00,0.00,$$2024-09-20T13:02:34-07:00$$,$$2024-09-20T13:03:04-07:00$$,$$Ian Brown$$,$$Admin$$,$$bb71f90d-61c4-46d1-bb9c-116d9444ec30$$,$$manager$$,1,$$Tab$$,2,$$inclusive$$,$$$$,$$Poppy$$,$$$$,0.00,$$75f5b22a-e3c4-4c54-9c27-3faec5595024$$,$$2024-09-20$$,$$2024-09-20T20:03:06.000Z$$,0,0,0.00, 0, $$$$, $$$$, NULL), ($$10aef268-3973-4e74-b92e-761572bd7fc7$$,$token$L’Agence shoot$token$,7302,$$Closed$$,23373.00,0.00,23373.00,0.00,$$2024-09-20T13:14:51-07:00$$,$$2024-09-20T13:15:39-07:00$$,$$Sara Martinez$$,$$Manager$$,$$645cb249-d9a9-4965-9b57-23d4ede686ee$$,$$manager$$,1,$$Tab$$,2,$$exclusive$$,$$$$,$$Keys Los Angeles$$,$$$$,0.00,$$a7073607-3880-475f-91f6-46f23b7af08f$$,$$2024-09-20$$,$$2024-09-20T20:15:41.000Z$$,2337300,0,0.00, 0, $$$$, $$$$, NULL) ON CONFLICT(id) DO UPDATE SET sub_total = EXCLUDED.sub_total, tax_total = EXCLUDED.tax_total, employee=EXCLUDED.employee,total = https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fEXCLUDED.total&c=E,1,XUG2452gq_58ENqaRfMEFGdNhJ9Y_z2FI7HF6gCdqSbXwyJXq_2YLDglzgVaLmgtrXYSWrbQ-TlM3qyX3q-_eHy6z3G8A75wRGB4thE2&typo=1, open_time = EXCLUDED.open_time, close_time = EXCLUDED.close_time, updated_at = EXCLUDED.updated_at,voidcomp_reason_text = EXCLUDED.voidcomp_reason_text, voidcomp_type = EXCLUDED.voidcomp_type, voidcomp_value = EXCLUDED.voidcomp_value,comp_total=EXCLUDED.comp_total, non_revenue_total = EXCLUDED.non_revenue_total, revenue_total = EXCLUDED.revenue_total;

--
Erik

Attachment Content-Type Size
data-1727098241740.csv text/csv 19.6 KB
data-1727098241740.csv text/csv 19.6 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nathan Bossart 2024-09-23 18:24:59 Re: vacuumdb: permission denied for schema "pg_temp_7"
Previous Message Erik Wienhold 2024-09-23 12:33:41 Re: Can't fix Pgsql Insert Command Issue.