You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ch...@apache.org on 2026/01/14 13:15:41 UTC

(cloudberry) branch cbdb-postgres-merge updated (4ac5445c650 -> f6f0ade5641)

This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a change to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


    from 4ac5445c650 fix_with
     new 0792fadedc5 Add prodataaccess and proexeclocation column in function dump codes
     new f6f0ade5641 Add hashagg_spill_temp_files fault injector

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/backend/executor/nodeAgg.c            | 15 +++++++++++++++
 src/bin/pg_dump/pg_dump.c                 |  2 ++
 src/test/regress/sql/temp_tablespaces.sql | 23 ++++++++++++++++-------
 3 files changed, 33 insertions(+), 7 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 02/02: Add hashagg_spill_temp_files fault injector

Posted by ch...@apache.org.
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

commit f6f0ade564179efb552dd42ad31af58abefdad84
Author: Jinbao Chen <ch...@gmail.com>
AuthorDate: Wed Jan 14 20:46:11 2026 +0800

    Add hashagg_spill_temp_files fault injector
---
 src/backend/executor/nodeAgg.c            | 15 +++++++++++++++
 src/test/regress/sql/temp_tablespaces.sql | 23 ++++++++++++++++-------
 2 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 46ac1416aa2..e63f21c43ab 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -1960,6 +1960,21 @@ hash_agg_enter_spill_mode(AggState *aggstate)
 
 		aggstate->hash_spills = palloc(sizeof(HashAggSpill) * aggstate->num_hashes);
 
+#ifdef FAULT_INJECTOR
+		if (SIMPLE_FAULT_INJECTOR("hashagg_spill_temp_files") == FaultInjectorTypeSkip) {
+			const char *filename = LogicalTapeGetBufFilename(aggstate->hash_tapeset);
+			if (!filename)
+				ereport(NOTICE, (errmsg("hashagg: buffilename is null")));
+			else if (strstr(filename, "base/" PG_TEMP_FILES_DIR) == filename)
+				ereport(NOTICE, (errmsg("hashagg: Use default tablespace")));
+			else if (strstr(filename, "pg_tblspc/") == filename)
+				ereport(NOTICE, (errmsg("hashagg: Use temp tablespace")));
+			else
+				ereport(NOTICE, (errmsg("hashagg: Unexpected prefix of the tablespace path")));
+
+		}
+#endif
+
 		for (int setno = 0; setno < aggstate->num_hashes; setno++)
 		{
 			AggStatePerHash perhash = &aggstate->perhash[setno];
diff --git a/src/test/regress/sql/temp_tablespaces.sql b/src/test/regress/sql/temp_tablespaces.sql
index 1130658f9da..111094b93e5 100644
--- a/src/test/regress/sql/temp_tablespaces.sql
+++ b/src/test/regress/sql/temp_tablespaces.sql
@@ -1,5 +1,9 @@
-create tablespace some_temp_tablespace location '@testtablespace@_temp_tablespace';
-create tablespace some_default_tablespace location '@testtablespace@_default_tablespace';
+\getenv abs_builddir PG_ABS_BUILDDIR
+\set temp_tablespace :abs_builddir '/testtablespace_temp_tablespace'
+\set dddefault_tablepace :abs_builddir '/testtablespace_default_tablespace'
+
+create tablespace some_temp_tablespace location :'temp_tablespace';
+create tablespace some_default_tablespace location :'dddefault_tablepace';
 
 -- Given I've set up GUCS for how to use tablespaces
 set temp_tablespaces to some_temp_tablespace;
@@ -31,11 +35,16 @@ reset temp_tablespaces;
 -- When the GUC temp_tablespaces is set, one of the temp tablespaces is used instead of the default tablespace.
 -- create several tablespaces and use them as temp tablespaces
 -- all QD/QEs in one session should have the same temp tablespace
-create tablespace mytempsp0 location '@testtablespace@_mytempsp0';
-create tablespace mytempsp1 location '@testtablespace@_mytempsp1';
-create tablespace mytempsp2 location '@testtablespace@_mytempsp2';
-create tablespace mytempsp3 location '@testtablespace@_mytempsp3';
-create tablespace mytempsp4 location '@testtablespace@_mytempsp4';
+\set mytempsp0 :abs_builddir '/testtablespace_mytempsp0'
+\set mytempsp1 :abs_builddir '/testtablespace_mytempsp1'
+\set mytempsp2 :abs_builddir '/testtablespace_mytempsp2'
+\set mytempsp3 :abs_builddir '/testtablespace_mytempsp3'
+\set mytempsp4 :abs_builddir '/testtablespace_mytempsp4'
+create tablespace mytempsp0 location :'mytempsp0';
+create tablespace mytempsp1 location :'mytempsp1';
+create tablespace mytempsp2 location :'mytempsp2';
+create tablespace mytempsp3 location :'mytempsp3';
+create tablespace mytempsp4 location :'mytempsp4';
 
 CREATE TABLE tts_foo (i int, j int) distributed by(i);
 insert into tts_foo select i, i from generate_series(1,80000)i;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 01/02: Add prodataaccess and proexeclocation column in function dump codes

Posted by ch...@apache.org.
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

commit 0792fadedc564d466035d64b7f447e74120b5a8a
Author: Jinbao Chen <ch...@gmail.com>
AuthorDate: Wed Jan 14 20:45:27 2026 +0800

    Add prodataaccess and proexeclocation column in function dump codes
---
 src/bin/pg_dump/pg_dump.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index c612dbb598f..dec72a8d0a6 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -13091,6 +13091,8 @@ dumpFunc(Archive *fout, const FuncInfo *finfo)
 							 "proconfig,\n"
 							 "procost,\n"
 							 "prorows,\n"
+							 "prodataaccess,\n"
+							 "proexeclocation,\n"
 							 "pg_catalog.pg_get_function_arguments(p.oid) AS funcargs,\n"
 							 "pg_catalog.pg_get_function_identity_arguments(p.oid) AS funciargs,\n"
 							 "pg_catalog.pg_get_function_result(p.oid) AS funcresult,\n"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org