This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 6f4364dddd5 Change version to 16.9
6f4364dddd5 is described below
commit 6f4364dddd5027d3fef443ea382a31481b9ede46
Author: Jinbao Chen <[email protected]>
AuthorDate: Thu Nov 27 00:28:23 2025 +0800
Change version to 16.9
---
configure | 2 +-
configure.ac | 2 +-
src/test/regress/expected/create_index.out | 2 +-
src/test/regress/expected/psql.out | 88 ++++--------------------------
src/test/regress/expected/publication.out | 71 +++++++++++++++---------
src/test/regress/expected/subscription.out | 1 -
src/test/regress/serial_schedule | 8 +--
src/test/regress/sql/publication.sql | 10 ----
8 files changed, 63 insertions(+), 121 deletions(-)
diff --git a/configure b/configure
index cb4317e3c67..e5422dcc3a0 100755
--- a/configure
+++ b/configure
@@ -2882,7 +2882,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS
$LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-PG_PACKAGE_VERSION=14.4
+PG_PACKAGE_VERSION=16.9
diff --git a/configure.ac b/configure.ac
index b79c8460748..02694e12f13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl The PACKAGE_VERSION from upstream PostgreSQL is
maintained in the
dnl PG_PACKAGE_VERSION variable, when merging make sure to update this
dnl variable with the merge conflict from the AC_INIT() statement.
AC_INIT([Apache Cloudberry], [2.0.0-devel], [[email protected]], [],
[https://cloudberry.apache.org/])
-[PG_PACKAGE_VERSION=14.4]
+[PG_PACKAGE_VERSION=16.9]
AC_SUBST(PG_PACKAGE_VERSION)
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version
2.69 is required.
diff --git a/src/test/regress/expected/create_index.out
b/src/test/regress/expected/create_index.out
index 26231701308..f77c67db4eb 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -1357,7 +1357,7 @@ unique, btree, for table "public.unique_tbl"
Column | Type | Key? | Definition
--------+---------+------+------------
i | integer | yes | i
-unique, btree, for table "public.unique_tbl"
+unique nulls not distinct, btree, for table "public.unique_tbl"
SELECT pg_get_indexdef('unique_idx3'::regclass);
pg_get_indexdef
diff --git a/src/test/regress/expected/psql.out
b/src/test/regress/expected/psql.out
index 744d359c587..b2bd51da6d1 100644
--- a/src/test/regress/expected/psql.out
+++ b/src/test/regress/expected/psql.out
@@ -5414,8 +5414,6 @@ reset work_mem;
pg_catalog | && | anyarray | anyarray | boolean | overlaps
(1 row)
-<<<<<<< HEAD
-=======
-- check \df+
-- we have to use functions with a predictable owner name, so make a role
create role regress_psql_user superuser;
@@ -5435,12 +5433,12 @@ create function psql_df_plpgsql ()
as $$ begin return; end; $$;
comment on function psql_df_plpgsql () is 'some comment';
\df+ psql_df_*
-
List of functions
- Schema | Name | Result data type | Argument data types | Type |
Volatility | Parallel | Owner | Security | Access privileges |
Language | Internal name | Description
---------+------------------+------------------+---------------------+------+------------+----------+-------------------+----------+-------------------+----------+---------------+--------------
- public | psql_df_internal | double precision | double precision | func |
immutable | safe | regress_psql_user | invoker | |
internal | dsin |
- public | psql_df_plpgsql | void | | func |
volatile | unsafe | regress_psql_user | invoker | |
plpgsql | | some comment
- public | psql_df_sql | integer | x integer | func |
volatile | unsafe | regress_psql_user | definer | | sql
| |
+
List of functions
+ Schema | Name | Result data type | Argument data types | Type |
Data access | Execute on | Volatility | Parallel | Owner |
Security | Access privileges | Language | Internal name | Description
+--------+------------------+------------------+---------------------+------+--------------+------------+------------+----------+-------------------+----------+-------------------+----------+---------------+--------------
+ public | psql_df_internal | double precision | double precision | func |
no sql | any | immutable | safe | regress_psql_user | invoker
| | internal | dsin |
+ public | psql_df_plpgsql | void | | func |
no sql | any | volatile | unsafe | regress_psql_user | invoker
| | plpgsql | | some comment
+ public | psql_df_sql | integer | x integer | func |
contains sql | any | volatile | unsafe | regress_psql_user | definer
| | sql | |
(3 rows)
rollback;
@@ -5972,7 +5970,6 @@ SELECT * FROM bla ORDER BY 1;
# final ON_ERROR_ROLLBACK: off
DROP TABLE bla;
DROP FUNCTION psql_error;
->>>>>>> REL_16_9
-- check describing invalid multipart names
\dA regression.heap
improper qualified name (too many dotted names): regression.heap
@@ -6202,15 +6199,9 @@ List of access methods
(0 rows)
\dt "no.such.table.relation"
-<<<<<<< HEAD
List of relations
Schema | Name | Type | Owner | Storage
--------+------+------+-------+---------
-=======
- List of relations
- Schema | Name | Type | Owner
---------+------+------+-------
->>>>>>> REL_16_9
(0 rows)
\da "no.such.aggregate.function"
@@ -6298,15 +6289,9 @@ List of access methods
(0 rows)
\dt "no.such.relation"
-<<<<<<< HEAD
List of relations
Schema | Name | Type | Owner | Storage
--------+------+------+-------+---------
-=======
- List of relations
- Schema | Name | Type | Owner
---------+------+------+-------
->>>>>>> REL_16_9
(0 rows)
\dv "no.such.relation"
@@ -6358,15 +6343,9 @@ List of text search templates
(0 rows)
\dg "no.such.role"
-<<<<<<< HEAD
- List of roles
- Role name | Attributes | Member of
------------+------------+-----------
-=======
List of roles
Role name | Attributes
-----------+------------
->>>>>>> REL_16_9
\dL "no.such.language"
List of languages
@@ -6387,15 +6366,9 @@ List of schemas
(0 rows)
\dO "no.such.collation"
-<<<<<<< HEAD
- List of collations
- Schema | Name | Collate | Ctype | Provider | Deterministic?
---------+------+---------+-------+----------+----------------
-=======
List of collations
Schema | Name | Provider | Collate | Ctype | ICU Locale | ICU Rules |
Deterministic?
--------+------+----------+---------+-------+------------+-----------+----------------
->>>>>>> REL_16_9
(0 rows)
\dp "no.such.access.privilege"
@@ -6456,15 +6429,9 @@ List of schemas
\dA "no.such.schema"."no.such.access.method"
improper qualified name (too many dotted names):
"no.such.schema"."no.such.access.method"
\dt "no.such.schema"."no.such.table.relation"
-<<<<<<< HEAD
List of relations
Schema | Name | Type | Owner | Storage
--------+------+------+-------+---------
-=======
- List of relations
- Schema | Name | Type | Owner
---------+------+------+-------
->>>>>>> REL_16_9
(0 rows)
\da "no.such.schema"."no.such.aggregate.function"
@@ -6532,15 +6499,9 @@ improper qualified name (too many dotted names):
"no.such.schema"."no.such.table
(0 rows)
\dt "no.such.schema"."no.such.relation"
-<<<<<<< HEAD
List of relations
Schema | Name | Type | Owner | Storage
--------+------+------+-------+---------
-=======
- List of relations
- Schema | Name | Type | Owner
---------+------+------+-------
->>>>>>> REL_16_9
(0 rows)
\dv "no.such.schema"."no.such.relation"
@@ -6594,15 +6555,9 @@ cross-database references are not implemented:
"no.such.schema"."no.such.languag
(0 rows)
\dO "no.such.schema"."no.such.collation"
-<<<<<<< HEAD
- List of collations
- Schema | Name | Collate | Ctype | Provider | Deterministic?
---------+------+---------+-------+----------+----------------
-=======
List of collations
Schema | Name | Provider | Collate | Ctype | ICU Locale | ICU Rules |
Deterministic?
--------+------+----------+---------+-------+------------+-----------+----------------
->>>>>>> REL_16_9
(0 rows)
\dp "no.such.schema"."no.such.access.privilege"
@@ -6641,15 +6596,9 @@ improper qualified name (too many dotted names):
"no.such.schema"."no.such.insta
improper qualified name (too many dotted names):
"no.such.schema"."no.such.event.trigger"
-- again, but with current database and dotted schema qualifications.
\dt regression."no.such.schema"."no.such.table.relation"
-<<<<<<< HEAD
List of relations
Schema | Name | Type | Owner | Storage
--------+------+------+-------+---------
-=======
- List of relations
- Schema | Name | Type | Owner
---------+------+------+-------
->>>>>>> REL_16_9
(0 rows)
\da regression."no.such.schema"."no.such.aggregate.function"
@@ -6701,15 +6650,9 @@ improper qualified name (too many dotted names):
"no.such.schema"."no.such.event
(0 rows)
\dt regression."no.such.schema"."no.such.relation"
-<<<<<<< HEAD
List of relations
Schema | Name | Type | Owner | Storage
--------+------+------+-------+---------
-=======
- List of relations
- Schema | Name | Type | Owner
---------+------+------+-------
->>>>>>> REL_16_9
(0 rows)
\dv regression."no.such.schema"."no.such.relation"
@@ -6755,15 +6698,9 @@ List of text search templates
(0 rows)
\dO regression."no.such.schema"."no.such.collation"
-<<<<<<< HEAD
- List of collations
- Schema | Name | Collate | Ctype | Provider | Deterministic?
---------+------+---------+-------+----------+----------------
-=======
List of collations
Schema | Name | Provider | Collate | Ctype | ICU Locale | ICU Rules |
Deterministic?
--------+------+----------+---------+-------+------------+-----------+----------------
->>>>>>> REL_16_9
(0 rows)
\dp regression."no.such.schema"."no.such.access.privilege"
@@ -6837,8 +6774,6 @@ cross-database references are not implemented:
"no.such.database"."no.such.schem
cross-database references are not implemented:
"no.such.database"."no.such.schema"."no.such.data.type"
\dX "no.such.database"."no.such.schema"."no.such.extended.statistics"
cross-database references are not implemented:
"no.such.database"."no.such.schema"."no.such.extended.statistics"
-<<<<<<< HEAD
-=======
-- check \drg and \du
CREATE ROLE regress_du_role0;
CREATE ROLE regress_du_role1;
@@ -6859,12 +6794,12 @@ GRANT regress_du_role0 TO regress_du_role2 WITH ADMIN
FALSE, INHERIT FALSE, SET
Role name | Member of | Options | Grantor
------------------+------------------+---------------------+------------------
regress_du_role1 | regress_du_role0 | ADMIN, INHERIT, SET | regress_du_admin
- regress_du_role1 | regress_du_role0 | INHERIT | regress_du_role1
- regress_du_role1 | regress_du_role0 | SET | regress_du_role2
- regress_du_role2 | regress_du_role0 | ADMIN | regress_du_admin
+ regress_du_role1 | regress_du_role0 | INHERIT, SET | regress_du_role1
+ regress_du_role1 | regress_du_role0 | INHERIT, SET | regress_du_role2
+ regress_du_role2 | regress_du_role0 | ADMIN, INHERIT, SET | regress_du_admin
regress_du_role2 | regress_du_role0 | INHERIT, SET | regress_du_role1
- regress_du_role2 | regress_du_role0 | | regress_du_role2
- regress_du_role2 | regress_du_role1 | ADMIN, SET | regress_du_admin
+ regress_du_role2 | regress_du_role0 | INHERIT, SET | regress_du_role2
+ regress_du_role2 | regress_du_role1 | ADMIN, INHERIT, SET | regress_du_admin
(7 rows)
\du regress_du_role*
@@ -6879,4 +6814,3 @@ DROP ROLE regress_du_role0;
DROP ROLE regress_du_role1;
DROP ROLE regress_du_role2;
DROP ROLE regress_du_admin;
->>>>>>> REL_16_9
diff --git a/src/test/regress/expected/publication.out
b/src/test/regress/expected/publication.out
index 857bf53f675..f5249ae19e9 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -275,19 +275,6 @@ HINT: To enable updating the table, set REPLICA IDENTITY
using ALTER TABLE.
ALTER PUBLICATION testpub_forparted DROP TABLE testpub_parted;
-- works again, because update is no longer replicated
UPDATE testpub_parted2 SET a = 2;
-<<<<<<< HEAD
--- publication includes both the parent table and the child table
-ALTER PUBLICATION testpub_forparted ADD TABLE testpub_parted, testpub_parted2;
--- only parent is listed as being in publication, not the partition
-SELECT * FROM pg_publication_tables;
- pubname | schemaname | tablename
--------------------+------------+----------------
- testpub_forparted | public | testpub_parted
-(1 row)
-
-DROP TABLE testpub_parted1, testpub_parted2;
-DROP PUBLICATION testpub_forparted, testpub_forparted1;
-=======
DROP TABLE testpub_parted1, testpub_parted2;
DROP PUBLICATION testpub_forparted, testpub_forparted1;
-- Tests for row filters
@@ -606,10 +593,16 @@ DETAIL: Column used in the publication WHERE expression
is not part of the repl
-- Case 4. REPLICA IDENTITY INDEX
ALTER TABLE rf_tbl_abcd_pk ALTER COLUMN c SET NOT NULL;
CREATE UNIQUE INDEX idx_abcd_pk_c ON rf_tbl_abcd_pk(c);
+ERROR: UNIQUE index must contain all columns in the table's distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE rf_tbl_abcd_pk REPLICA IDENTITY USING INDEX idx_abcd_pk_c;
+ERROR: index "idx_abcd_pk_c" for table "rf_tbl_abcd_pk" does not exist
ALTER TABLE rf_tbl_abcd_nopk ALTER COLUMN c SET NOT NULL;
CREATE UNIQUE INDEX idx_abcd_nopk_c ON rf_tbl_abcd_nopk(c);
+ERROR: UNIQUE index must contain all columns in the table's distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE rf_tbl_abcd_nopk REPLICA IDENTITY USING INDEX idx_abcd_nopk_c;
+ERROR: index "idx_abcd_nopk_c" for table "rf_tbl_abcd_nopk" does not exist
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_pk WHERE (a > 99);
-- fail - "a" is in PK but it is not part of REPLICA IDENTITY INDEX
UPDATE rf_tbl_abcd_pk SET a = 1;
@@ -618,6 +611,8 @@ DETAIL: Column used in the publication WHERE expression is
not part of the repl
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_pk WHERE (c > 99);
-- ok - "c" is not in PK but it is part of REPLICA IDENTITY INDEX
UPDATE rf_tbl_abcd_pk SET a = 1;
+ERROR: cannot update table "rf_tbl_abcd_pk"
+DETAIL: Column used in the publication WHERE expression is not part of the
replica identity.
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_nopk WHERE (a > 99);
-- fail - "a" is not in REPLICA IDENTITY INDEX
UPDATE rf_tbl_abcd_nopk SET a = 1;
@@ -626,6 +621,8 @@ DETAIL: Column used in the publication WHERE expression is
not part of the repl
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_nopk WHERE (c > 99);
-- ok - "c" is part of REPLICA IDENTITY INDEX
UPDATE rf_tbl_abcd_nopk SET a = 1;
+ERROR: cannot update table "rf_tbl_abcd_nopk"
+DETAIL: Column used in the publication WHERE expression is not part of the
replica identity.
-- Tests for partitioned table
-- set PUBLISH_VIA_PARTITION_ROOT to false and test row filter for partitioned
-- table
@@ -716,20 +713,20 @@ HINT: Use DROP ... CASCADE to drop the dependent objects
too.
ALTER PUBLICATION testpub_fortable_insert ADD TABLE testpub_tbl5 (b, c);
/* not all replica identities are good enough */
CREATE UNIQUE INDEX testpub_tbl5_b_key ON testpub_tbl5 (b, c);
+ERROR: UNIQUE index must contain all columns in the table's distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE testpub_tbl5 ALTER b SET NOT NULL, ALTER c SET NOT NULL;
ALTER TABLE testpub_tbl5 REPLICA IDENTITY USING INDEX testpub_tbl5_b_key;
+ERROR: index "testpub_tbl5_b_key" for table "testpub_tbl5" does not exist
-- error: replica identity (b,c) is not covered by column list (a, c)
UPDATE testpub_tbl5 SET a = 1;
-ERROR: cannot update table "testpub_tbl5"
-DETAIL: Column list used by the publication does not cover the replica
identity.
ALTER PUBLICATION testpub_fortable DROP TABLE testpub_tbl5;
-- error: change the replica identity to "b", and column list to (a, c)
-- then update fails, because (a, c) does not cover replica identity
ALTER TABLE testpub_tbl5 REPLICA IDENTITY USING INDEX testpub_tbl5_b_key;
+ERROR: index "testpub_tbl5_b_key" for table "testpub_tbl5" does not exist
ALTER PUBLICATION testpub_fortable ADD TABLE testpub_tbl5 (a, c);
UPDATE testpub_tbl5 SET a = 1;
-ERROR: cannot update table "testpub_tbl5"
-DETAIL: Column list used by the publication does not cover the replica
identity.
/* But if upd/del are not published, it works OK */
SET client_min_messages = 'ERROR';
CREATE PUBLICATION testpub_table_ins WITH (publish = 'insert, truncate');
@@ -806,7 +803,10 @@ ALTER TABLE testpub_tbl8_0 REPLICA IDENTITY USING INDEX
testpub_tbl8_0_pkey;
-- second partition has replica identity "b"
CREATE TABLE testpub_tbl8_1 PARTITION OF testpub_tbl8 FOR VALUES WITH (modulus
2, remainder 1);
ALTER TABLE testpub_tbl8_1 ADD PRIMARY KEY (b);
+ERROR: PRIMARY KEY definition must contain all columns in the table's
distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE testpub_tbl8_1 REPLICA IDENTITY USING INDEX testpub_tbl8_1_pkey;
+ERROR: index "testpub_tbl8_1_pkey" for table "testpub_tbl8_1" does not exist
-- ok: column list covers both "a" and "b"
SET client_min_messages = 'ERROR';
CREATE PUBLICATION testpub_col_list FOR TABLE testpub_tbl8 (a, b) WITH
(publish_via_partition_root = 'true');
@@ -815,12 +815,14 @@ RESET client_min_messages;
ALTER PUBLICATION testpub_col_list DROP TABLE testpub_tbl8;
ALTER PUBLICATION testpub_col_list ADD TABLE testpub_tbl8 (a, b);
UPDATE testpub_tbl8 SET a = 1;
+ERROR: cannot update table "testpub_tbl8_1" because it does not have a
replica identity and publishes updates
+HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.
-- failure: column list does not cover replica identity for the second
partition
ALTER PUBLICATION testpub_col_list DROP TABLE testpub_tbl8;
ALTER PUBLICATION testpub_col_list ADD TABLE testpub_tbl8 (a, c);
UPDATE testpub_tbl8 SET a = 1;
-ERROR: cannot update table "testpub_tbl8_1"
-DETAIL: Column list used by the publication does not cover the replica
identity.
+ERROR: cannot update table "testpub_tbl8_1" because it does not have a
replica identity and publishes updates
+HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.
ALTER PUBLICATION testpub_col_list DROP TABLE testpub_tbl8;
-- failure: one of the partitions has REPLICA IDENTITY FULL
ALTER TABLE testpub_tbl8_1 REPLICA IDENTITY FULL;
@@ -831,6 +833,7 @@ DETAIL: Column list used by the publication does not cover
the replica identity
ALTER PUBLICATION testpub_col_list DROP TABLE testpub_tbl8;
-- add table and then try changing replica identity
ALTER TABLE testpub_tbl8_1 REPLICA IDENTITY USING INDEX testpub_tbl8_1_pkey;
+ERROR: index "testpub_tbl8_1_pkey" for table "testpub_tbl8_1" does not exist
ALTER PUBLICATION testpub_col_list ADD TABLE testpub_tbl8 (a, b);
-- failure: replica identity full can't be used with a column list
ALTER TABLE testpub_tbl8_1 REPLICA IDENTITY FULL;
@@ -839,8 +842,12 @@ ERROR: cannot update table "testpub_tbl8_1"
DETAIL: Column list used by the publication does not cover the replica
identity.
-- failure: replica identity has to be covered by the column list
ALTER TABLE testpub_tbl8_1 DROP CONSTRAINT testpub_tbl8_1_pkey;
+ERROR: constraint "testpub_tbl8_1_pkey" of relation "testpub_tbl8_1" does not
exist
ALTER TABLE testpub_tbl8_1 ADD PRIMARY KEY (c);
+ERROR: PRIMARY KEY definition must contain all columns in the table's
distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE testpub_tbl8_1 REPLICA IDENTITY USING INDEX testpub_tbl8_1_pkey;
+ERROR: index "testpub_tbl8_1_pkey" for table "testpub_tbl8_1" does not exist
UPDATE testpub_tbl8 SET a = 1;
ERROR: cannot update table "testpub_tbl8_1"
DETAIL: Column list used by the publication does not cover the replica
identity.
@@ -856,14 +863,17 @@ ALTER TABLE testpub_tbl8_0 REPLICA IDENTITY USING INDEX
testpub_tbl8_0_pkey;
-- second partition has replica identity "b"
CREATE TABLE testpub_tbl8_1 (a int, b text, c text);
ALTER TABLE testpub_tbl8_1 ADD PRIMARY KEY (c);
+ERROR: PRIMARY KEY definition must contain all columns in the table's
distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE testpub_tbl8_1 REPLICA IDENTITY USING INDEX testpub_tbl8_1_pkey;
+ERROR: index "testpub_tbl8_1_pkey" for table "testpub_tbl8_1" does not exist
-- ok: attaching first partition works, because (a) is in column list
ALTER TABLE testpub_tbl8 ATTACH PARTITION testpub_tbl8_0 FOR VALUES WITH
(modulus 2, remainder 0);
-- failure: second partition has replica identity (c), which si not in column
list
ALTER TABLE testpub_tbl8 ATTACH PARTITION testpub_tbl8_1 FOR VALUES WITH
(modulus 2, remainder 1);
UPDATE testpub_tbl8 SET a = 1;
-ERROR: cannot update table "testpub_tbl8_1"
-DETAIL: Column list used by the publication does not cover the replica
identity.
+ERROR: cannot update table "testpub_tbl8_1" because it does not have a
replica identity and publishes updates
+HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.
-- failure: changing replica identity to FULL for partition fails, because
-- of the column list on the parent
ALTER TABLE testpub_tbl8_0 REPLICA IDENTITY FULL;
@@ -1005,26 +1015,36 @@ HINT: To enable updating the table, set REPLICA
IDENTITY using ALTER TABLE.
-- Case 4. REPLICA IDENTITY INDEX
ALTER TABLE rf_tbl_abcd_pk ALTER COLUMN c SET NOT NULL;
CREATE UNIQUE INDEX idx_abcd_pk_c ON rf_tbl_abcd_pk(c);
+ERROR: UNIQUE index must contain all columns in the table's distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE rf_tbl_abcd_pk REPLICA IDENTITY USING INDEX idx_abcd_pk_c;
+ERROR: index "idx_abcd_pk_c" for table "rf_tbl_abcd_pk" does not exist
ALTER TABLE rf_tbl_abcd_nopk ALTER COLUMN c SET NOT NULL;
CREATE UNIQUE INDEX idx_abcd_nopk_c ON rf_tbl_abcd_nopk(c);
+ERROR: UNIQUE index must contain all columns in the table's distribution key
+DETAIL: Distribution key column "a" is not included in the constraint.
ALTER TABLE rf_tbl_abcd_nopk REPLICA IDENTITY USING INDEX idx_abcd_nopk_c;
+ERROR: index "idx_abcd_nopk_c" for table "rf_tbl_abcd_nopk" does not exist
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_pk (a);
-- fail - column list "a" does not cover the REPLICA IDENTITY INDEX on "c"
UPDATE rf_tbl_abcd_pk SET a = 1;
-ERROR: cannot update table "rf_tbl_abcd_pk"
-DETAIL: Column list used by the publication does not cover the replica
identity.
+ERROR: cannot update table "rf_tbl_abcd_pk" because it does not have a
replica identity and publishes updates
+HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_pk (c);
-- ok - column list "c" does cover the REPLICA IDENTITY INDEX on "c"
UPDATE rf_tbl_abcd_pk SET a = 1;
+ERROR: cannot update table "rf_tbl_abcd_pk" because it does not have a
replica identity and publishes updates
+HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_nopk (a);
-- fail - column list "a" does not cover the REPLICA IDENTITY INDEX on "c"
UPDATE rf_tbl_abcd_nopk SET a = 1;
-ERROR: cannot update table "rf_tbl_abcd_nopk"
-DETAIL: Column list used by the publication does not cover the replica
identity.
+ERROR: cannot update table "rf_tbl_abcd_nopk" because it does not have a
replica identity and publishes updates
+HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.
ALTER PUBLICATION testpub6 SET TABLE rf_tbl_abcd_nopk (c);
-- ok - column list "c" does cover the REPLICA IDENTITY INDEX on "c"
UPDATE rf_tbl_abcd_nopk SET a = 1;
+ERROR: cannot update table "rf_tbl_abcd_nopk" because it does not have a
replica identity and publishes updates
+HINT: To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.
-- Tests for partitioned table
-- set PUBLISH_VIA_PARTITION_ROOT to false and test column list for partitioned
-- table
@@ -1076,7 +1096,6 @@ DROP TABLE rf_tbl_abcd_pk;
DROP TABLE rf_tbl_abcd_nopk;
DROP TABLE rf_tbl_abcd_part_pk;
-- ======================================================
->>>>>>> REL_16_9
-- Test cache invalidation FOR ALL TABLES publication
SET client_min_messages = 'ERROR';
CREATE TABLE testpub_tbl4(a int);
diff --git a/src/test/regress/expected/subscription.out
b/src/test/regress/expected/subscription.out
index f0764a4a96c..7f36317fb2a 100644
--- a/src/test/regress/expected/subscription.out
+++ b/src/test/regress/expected/subscription.out
@@ -134,7 +134,6 @@ DROP SUBSCRIPTION regress_testsub4;
-- fail, connection string does not parse
CREATE SUBSCRIPTION regress_testsub5 CONNECTION 'i_dont_exist=param'
PUBLICATION testpub;
ERROR: invalid connection string syntax: invalid connection option
"i_dont_exist"
-
-- fail, connection string parses, but doesn't work (and does so without
-- connecting, so this is reliable and safe)
CREATE SUBSCRIPTION regress_testsub5 CONNECTION 'port=-1' PUBLICATION testpub;
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 1d43876a50a..61db0804151 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -143,11 +143,11 @@ test: psql
test: psql_crosstab
test: amutils
test: stats_ext
-# test: collate.linux.utf8
-# test: select_parallel
+test: collate.linux.utf8
+#test: select_parallel
# test: write_parallel
-# test: publication
-# test: subscription
+test: publication
+test: subscription
# test: select_views
# test: portals_p2
# #test: foreign_key
diff --git a/src/test/regress/sql/publication.sql
b/src/test/regress/sql/publication.sql
index 25683968df3..d5051a5e746 100644
--- a/src/test/regress/sql/publication.sql
+++ b/src/test/regress/sql/publication.sql
@@ -146,15 +146,6 @@ UPDATE testpub_parted2 SET a = 2;
ALTER PUBLICATION testpub_forparted DROP TABLE testpub_parted;
-- works again, because update is no longer replicated
UPDATE testpub_parted2 SET a = 2;
-<<<<<<< HEAD
--- publication includes both the parent table and the child table
-ALTER PUBLICATION testpub_forparted ADD TABLE testpub_parted, testpub_parted2;
--- only parent is listed as being in publication, not the partition
-SELECT * FROM pg_publication_tables;
-DROP TABLE testpub_parted1, testpub_parted2;
-DROP PUBLICATION testpub_forparted, testpub_forparted1;
-
-=======
DROP TABLE testpub_parted1, testpub_parted2;
DROP PUBLICATION testpub_forparted, testpub_forparted1;
@@ -713,7 +704,6 @@ DROP TABLE rf_tbl_abcd_nopk;
DROP TABLE rf_tbl_abcd_part_pk;
-- ======================================================
->>>>>>> REL_16_9
-- Test cache invalidation FOR ALL TABLES publication
SET client_min_messages = 'ERROR';
CREATE TABLE testpub_tbl4(a int);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]