Re: BUG #18556: Parallel operation error during CREATE TABLE AS statement - Mailing list pgsql-bugs

From Aleksander Alekseev
Subject Re: BUG #18556: Parallel operation error during CREATE TABLE AS statement
Date
Msg-id CAJ7c6TOwU4jOjNBW=HneSZ6eW30cCnzMAoTaUYEFyJ6nO5cKiw@mail.gmail.com
Whole thread Raw
In response to BUG #18556: Parallel operation error during CREATE TABLE AS statement  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18556: Parallel operation error during CREATE TABLE AS statement
List pgsql-bugs
Hi,

> We have been witnessing an intermittent error from a Postgres 16.3 instance
> if a table is created using a SELECT statement. The error is:
>
> ERROR: cannot start commands during a parallel operation
>
> [...]

I tried to reproduce the issue on debug and release builds of
PostgreSQL `master` and `REL_16_STABLE` on different hardware and
didn't succeed so far.

Here are the queries I used:

```
CREATE TABLE IF NOT EXISTS phonebook(
  id SERIAL PRIMARY KEY,
  name TEXT,
  phone BIGINT);

INSERT INTO phonebook
  SELECT i, 'name_' || i, i # 0xDEADBEEF
  FROM generate_series(1, 54_000_000) AS i;

SET parallel_tuple_cost = 0;

-- execute several times:
-- make sure Parallel Seq Scan is used with EXPLAIN ANALYZE
CREATE [TEMP] TABLE pb_subset AS (
  SELECT id, name
  FROM phonebook
  WHERE phone > [choose a number]
);
```

If you could provide minimal steps that reproduce the issue on your
hardware this would be helpful. Please let us know whether the issue
reproduces on PostgreSQL 17 beta, or only on 16.3. Also please give us
a little more details about the hardware.

--
Best regards,
Aleksander Alekseev



pgsql-bugs by date:

Previous
From: Chris BSomething
Date:
Subject: Inconsistency of timezones in postgresql
Next
From: Aleksander Alekseev
Date:
Subject: Re: Inconsistency of timezones in postgresql