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-24 01:42:07
Message-ID: SN7PR20MB5958C7A77CF15A50D1508F90BE682@SN7PR20MB5958.namprd20.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I tried to get the PID of the session but can't get the response. Same issue.

[https://res.public.onecdn.static.microsoft/assets/mail/file-icon/png/photo_16x16.png]Screenshot_2.png<https://hwoodgroup-my.sharepoint.com/:i:/p/mkostevych/EZev3xZoyMRLkJf7RZTA5XwB8H1BcgtH09K9bjmcUx_YvA>

​[https://res.cdn.office.net/assets/mail/file-icon/png/txt_16x16.png]Create Script.txt<https://hwoodgroup-my.sharepoint.com/:t:/p/mkostevych/ESPFd2CzRRpAt7mzbaiJt1IB3k1z9C67vZAC-RU4njjhLA>
[https://res.cdn.office.net/assets/mail/file-icon/png/txt_16x16.png]Create Script(check_items).txt<https://hwoodgroup-my.sharepoint.com/:t:/p/mkostevych/Ef9QlV-ghRZHgCWZaczbSgsBuQGz8ISDxtvv7tQnCi8z6g>
[https://res.cdn.office.net/assets/mail/file-icon/png/txt_16x16.png]Cretae Script(employees).txt<https://hwoodgroup-my.sharepoint.com/:t:/p/mkostevych/ET7M1kBp8udBsxQrJH03XGwBUl0Sw9SCjgiIpImCoswKdA>

As you asked, I attached Create script for three tables(checks, check_items, employees). I think we don't have any issue on employees table.
Hope to get the solution asap. Thank you.

Mark
________________________________
From: Erik Wienhold <ewie(at)ewie(dot)name>
Sent: Monday, September 23, 2024 7:50 PM
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 18:53 +0200, Mark Kostevych wrote:
> Could you check please why our insert command doesn't work?
>
> INSERT INTO public.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 ('1cfa4fc4-de12-4adc-a5f1-25e27203aeaf','21',5807,'Closed',410.00,35.16,445.16,0.00,'2024-09-22T20:14:42-07:00','2024-09-22T21:45:40-07:00','Kristian Maxwell-McGeever','Server','da37c15c-2f2d-43f1-9959-070f231dd79a','666692_Kristian_Bird Streets Club_Server',4,'Table',1,'exclusive','21','Bird Streets Club','Restaurant',0.00,'d1abd697-04fa-40d6-8a9e-7c376dc2952d','2024-09-22','2024-09-23T12:19:41.000Z',0,410,0.00, 343, '', '', NULL);
>
> I tried very simple insert command, but it still doesn't work. What
> should I do?

The attached CSV only shows held locks, nothing that caught my eye. Can
you please check pg_blocking_pids() to make sure that there are really
no blocking sessions? https://wiki.postgresql.org/wiki/Lock_Monitoring
says that the listed queries only return row-level locks. (Not sure if
that is correct because the docs on pg_locks says that it normally does
not return row-level locks.)

First, get the PID of the session where you run your INSERT:

SELECT pg_backend_pid();
INSERT INTO public.checks ...

In a second session, get the info on all backends that block the first
session:

SELECT * FROM pg_stat_activity WHERE pid = ANY (pg_blocking_pids(:pid));

Please also provide the CREATE TABLE statements (or the output of psql's
\d) for table "checks" and all tables that are referenced by "checks".

Also, what is the exact Postgres version?

Does the INSERT also hang when executed via psql instead of pgAdmin?
Just to rule out that pgAdmin is the issue.

--
Erik

Attachment Content-Type Size
Screenshot_1 1.png image/png 115.6 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Milhiser 2024-09-24 01:43:50 Re: Reference to - BUG #18349: ERROR: invalid DSA memory alloc request size 1811939328, CONTEXT: parallel worker
Previous Message vaibhave postgres 2024-09-24 01:35:41 Re: vacuumdb: permission denied for schema "pg_temp_7"