gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

Assert failure when insert into AO table which is NO column and then add one column

Open liming01 opened this issue 2 years ago • 3 comments

Bug Report

Greenplum version or build

gpdb6

Step to reproduce the behavior

The regression test subselect_gp, change heap table to AO, as below:

postgres=# create table csq_m1() with (appendoptimized=true, orientation=row);
NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause, and no column type is suitable for a distribution key. Creating a NULL policy entry.
CREATE TABLE
postgres=# set allow_system_table_mods=true;
SET
postgres=# delete from gp_distribution_policy where localoid='csq_m1'::regclass;
DELETE 1
postgres=# reset allow_system_table_mods;
RESET
postgres=# alter table csq_m1 add column x int;
ALTER TABLE
postgres=# insert into csq_m1 values(1);
FATAL:  Unexpected internal error (vacuum.c:1785)
DETAIL:  FailedAssertion("!(Gp_role == GP_ROLE_UTILITY)", File: "vacuum.c", Line: 1785)
HINT:  Process 1647 will wait for gp_debug_linger=120 seconds before termination.
Note that its locks and other resources will not be released until then.
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

liming01 avatar Aug 30 '22 10:08 liming01

Does this happen on 6X_STABLE? This problem does not exist in the master branch.

zjpedu avatar Aug 31 '22 08:08 zjpedu

Yes, I just tried on the 6X_STABLE branch.

liming01 avatar Sep 03 '22 09:09 liming01

I think by design AO and specially current CO tables might not work with zero columns. So this case we should detect and ERROR out I believe.

ashwinstar avatar Sep 07 '22 00:09 ashwinstar