Re: BUG #15446: Crash on ALTER TABLE
От
Andrew Dunstan
Тема
Re: BUG #15446: Crash on ALTER TABLE
Дата
Msg-id
f66296a1-2b66-e392-0ba0-64175d0846ec@2ndQuadrant.com
Ответ на
Re: BUG #15446: Crash on ALTER TABLE (Andres Freund)
Список
Дерево обсуждения
BUG #15446: Crash on ALTER TABLE PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15446: Crash on ALTER TABLE Andres Freund <andres@anarazel.de>
Re: BUG #15446: Crash on ALTER TABLE Dmitry Molotkov <aldarund@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #15446: Crash on ALTER TABLE Dmitry Molotkov <aldarund@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #15446: Crash on ALTER TABLE Dmitry Molotkov <aldarund@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #15446: Crash on ALTER TABLE Dmitry Molotkov <aldarund@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Dmitry Molotkov <aldarund@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Andres Freund <andres@anarazel.de>
Re: BUG #15446: Crash on ALTER TABLE Dmitry Molotkov <aldarund@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Andres Freund <andres@anarazel.de>
Re: BUG #15446: Crash on ALTER TABLE Dmitry Molotkov <aldarund@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15446: Crash on ALTER TABLE Dean Rasheed <dean.a.rasheed@gmail.com>
Re: BUG #15446: Crash on ALTER TABLE Andres Freund <andres@anarazel.de>
Re: BUG #15446: Crash on ALTER TABLE Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: BUG #15446: Crash on ALTER TABLE Michael Paquier <michael@paquier.xyz>
Re: BUG #15446: Crash on ALTER TABLE Magnus Hagander <magnus@hagander.net>
On 1/5/19 12:09 PM, Andres Freund wrote:
> Hi,
>
> On 2019-01-05 12:11:45 +0000, Dean Rasheed wrote:
>> It looks like the problem was introduced in PG11 by 16828d5c02 (Fast
>> ALTER TABLE ADD COLUMN with a non-NULL default). The first ALTER TABLE
>> adds a new column with a non-null default, setting atthasmissing and
>> attmissingval. Then the second ALTER TABLE changes the type of the new
>> column, but it fails to update attmissingval to match, and thus it
>> falls over when trying to re-open the relation because the value in
>> attmissingval is no longer compatible with the attribute type.
> Paging Dr Dunstan.
Investigating with this test case:
DROP TABLE IF EXISTS foo;
CREATE TABLE foo (a int);
ALTER TABLE foo ADD COLUMN b double precision DEFAULT 0.2;
ALTER TABLE foo ALTER COLUMN b TYPE varchar(5) USING b::varchar(5);
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-bugs по дате отправления
От: PG Bug reporting form
Дата:
От: David Rowley
Дата: