-
Notifications
You must be signed in to change notification settings - Fork 333
Open
Description
I have a large enum value within my application with approx 1400~ values.
When it runs as a single CREATE TYPE public.big_enum as ENUM the database crashes with 2025-10-18 21:22:47.645 GMT [0] FATAL: terminating connection because protocol synchronization was lost
However when I break the enum into individual:
ALTER TYPE public.big_enum ADD VALUE 'rf_0000002';
ALTER TYPE public.big_enum ADD VALUE 'rf_0000003';The db executes them without a problem.
Steps to Repdroduce:
Create a schema.sql file with entries up to 1000 values:
CREATE TYPE public.big_enum AS ENUM (
'rf_0000001',
'rf_0000002',
'rf_0000003',
'rf_0000004',
'rf_0000005',
'rf_0000006',
'rf_0000007',
......
)Run the database: npx pglite-server --path=/tmp/.s.PGSQL.5432 --debug=5 -d data
Load the schema file in through PGSSLMODE=disable psql -h /tmp -f schema.sql
The database will crash.
Converting the schema to individual ALTER TABLE statements then works.
I observed the same issue when a large insert.
Metadata
Metadata
Assignees
Labels
No labels