ALTER TABLE ALTER COLUMN SET TYPE crash - Mailing list pgsql-bugs

From Robins Tharakan
Subject ALTER TABLE ALTER COLUMN SET TYPE crash
Date
Msg-id CAEP4nAzwokLht2Bi3RCHNcCJBdOa8d7LnqJkDO1xiaH+biW8fw@mail.gmail.com
Whole thread Raw
Responses Re: ALTER TABLE ALTER COLUMN SET TYPE crash
List pgsql-bugs
Hi,

Unlike a recently reported similar issue, executing the following ALTER TABLE on the regression database crashes Postgres (master).

Admittedly it doesn't do anything constructive (and am new to the tool), but do let me know if such reports are interesting and / or if you need more details for reproduction.

Steps to reproduce:
==================

ubuntu@laptop:~$ dropdb --if-exists tempdel && createdb tempdel
ubuntu@laptop:~$ ./pg_regress --use-existing --schedule=serial_schedule --dbname=tempdel >/dev/null
ubuntu@laptop:~$ sleep 5 && psql -c "SELECT version();" tempdel
                                                version
--------------------------------------------------------------------------------------------------------
 PostgreSQL 14devel on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
(1 row)

ubuntu@laptop:~$ psql -c "begin; ALTER TABLE ONLY public.xacttest ALTER COLUMN a SET DATA TYPE  TEXT  USING public.max_xacttest(); ROLLBACK;" tempdel
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
connection to server was lost
ubuntu@laptop:~$ sleep 5 && psql -c "SELECT 1;" tempdel
 ?column?
----------
        1
(1 row)

-
robins tharakan

pgsql-bugs by date:

Previous
From: Robins Tharakan
Date:
Subject: ALTER TABLE error - Could not read block 0
Next
From: Michael Paquier
Date:
Subject: Re: ALTER TABLE ALTER COLUMN SET TYPE crash