Alexander Lakhin <exclus...@gmail.com> writes:
> I've discovered that 95f650674 introduced a defect similar to bug #18297,
> but this time with DEFAULT. Namely, the following script:
> CREATE TABLE a (aa text);
> CREATE TABLE c (cc text) INHERITS (a);
> CREATE TABLE d (dd text) INHERITS (c, a);
> ALTER TABLE a ADD COLUMN i int DEFAULT 1;

> fails with:
> ERROR:  XX000: tuple already updated by self
> LOCATION:  simple_heap_update, heapam.c:4421

Hmm, yeah.  The failing call is here:

            /* Bump the existing child att's inhcount */
            ...
            CatalogTupleUpdate(attrdesc, &tuple->t_self, tuple);

so I think you're right that that code path is now short a
CommandCounterIncrement() somewhere.  I'll look tomorrow if
nobody beats me to it.

                        regards, tom lane


Reply via email to