Error while inserting into newly created table

Hello, I am running Yugabyte on single node, and I am executing via ysqlsh an SQL script on a “fresh” database that creates the database schema and inserts data into some of the newly created tables. The SQL script therefore contains both DDL and DML statements, and these are interspersed (for example, a table is created, then there may be some INSERT statements for this table, then another table is created, and so forth).

I have seen the following happen once, after the following SQL was executed:
CREATE TABLE ptcraneregion
id integer,
pc numeric,
rc numeric,
pd numeric,
rd numeric,
sd numeric,
CONSTRAINT pk_pt_crane_region PRIMARY KEY(id)

insert into ptcraneregion values (1,‘A’,0.000088,3.45,2.27,0.205,1.49);

with the following appearing in the ~/var/logs/tserver/postgresql-2022-03-30_000000.log file:
I0330 09:49:57.246927 297368 ybccmds.c:482] Creating Table my_database.public.ptcraneregion
2022-03-30 09:49:57.383 UTC [297368] ERROR: could not open relation with OID 66783 at character 13
2022-03-30 09:49:57.383 UTC [297368] STATEMENT: insert into ptcraneregion values (1,‘A’,0.000088,3.45,2.27,0.205,1.49);

Is there anything we can do to avoid such error? For example, do we need to wait for some time period to elapse before inserting data into a newly created table?

Your input is greatly appreciated.

Thank you

What is the command you used for creating the cluster?

Can you describe the table to check the definition?

What do you see in the ui for table? Are there any tablet present?

Normally completion of create table should suffice and making the table ready for insertion unles there is some issue with storage. Since thisnis a single node cluster its unlikely to be a network related issue.

Can you also describe your cluster hardware? And were there any error logs when you ran the script on the yb-tserver/yb-master? You can do ./bin/yugabyted collect_logs if you used yugabyted cli to start the node.

Thank you for your input. Unfortunately I no longer have the database with the problem. If this issue occurs again I will perform the checks you suggested.

My setup is a single-node cluster running on my development PC, which is a Dell Optiplex 790 with 16 GB RAM and 8 CPUs (= 4 cores * 2 threads/core).

I started the single-node cluster using the command:
yugabyted start --tserver_flags=“pg_yb_session_timeout_ms=900000”

I checked and there were no error logs from yb-tserver nor from yb-master when I ran the script.