Re: Can't fix Pgsql Insert Command Issue.

From: Erik Wienhold <ewie(at)ewie(dot)name>
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.
Date: 2024-09-23 12:33:41
Message-ID: e0d0f03e-c19d-448b-896e-93c9ed84c487@ewie.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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 = EXCLUDED.total, 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Kostevych 2024-09-23 13:33:22 Re: Can't fix Pgsql Insert Command Issue.
Previous Message Никита Калинин 2024-09-23 08:21:13 Re: BUG #18609: Repeated installcheck failure in test_pg_dump due to existing role