From: Erik Wienhold <ewie@ewie.name>
To: Mark Kostevych <mkostevych@hwoodgroup.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Cc: Jacob Shure <jacob@shurehw.com>
Cc: Michael Green <Michael@hwoodgroup.com>
Subject: Re: Can't fix Pgsql Insert Command Issue.
Date: Mon, 23 Sep 2024 14:33:41 +0200
Message-ID: <e0d0f03e-c19d-448b-896e-93c9ed84c487@ewie.name> (raw)
In-Reply-To: <DS0PR20MB5961DC8A1FA8198748CF7757BE6F2@DS0PR20MB5961.namprd20.prod.outlook.com>
References: <DS0PR20MB5961DC8A1FA8198748CF7757BE6F2@DS0PR20MB5961.namprd20.prod.outlook.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: ewie@ewie.name, mkostevych@hwoodgroup.com, pgsql-bugs@lists.postgresql.org, jacob@shurehw.com, Michael@hwoodgroup.com
Subject: Re: Can't fix Pgsql Insert Command Issue.
In-Reply-To: <e0d0f03e-c19d-448b-896e-93c9ed84c487@ewie.name>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox