gpdb
gpdb copied to clipboard
Assert failure when insert into AO table which is NO column and then add one column
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.
Does this happen on 6X_STABLE? This problem does not exist in the master branch.
Yes, I just tried on the 6X_STABLE branch.
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.