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 bf6cbd93e1a Fix some issues for aset
bf6cbd93e1a is described below

commit bf6cbd93e1aa5472b3f4aa0af237e324fe405e9d
Author: Jinbao Chen <[email protected]>
AuthorDate: Sun Oct 12 23:18:42 2025 +0800

    Fix some issues for aset
---
 src/backend/cdb/cdbvars.c                 | 2 +-
 src/backend/utils/mmgr/aset.c             | 2 +-
 src/bin/initdb/initdb.c                   | 2 --
 src/include/catalog/pg_password_history.h | 2 +-
 src/include/catalog/pg_profile.h          | 2 +-
 5 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/backend/cdb/cdbvars.c b/src/backend/cdb/cdbvars.c
index 9db3389e0bf..b1c5d60cf0c 100644
--- a/src/backend/cdb/cdbvars.c
+++ b/src/backend/cdb/cdbvars.c
@@ -428,7 +428,7 @@ check_gp_role(char **newval, void **extra, GucSource source)
        if (!IsPostmasterEnvironment && newrole != GP_ROLE_UTILITY)
        {
                elog(LOG, "gp_role forced to 'utility' in single-user mode");
-               *newval = strdup("utility");
+               *newval = guc_strdup(ERROR, "utility");
                return true;
        }
 
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index 3b1db73038a..da9664ab6dc 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -1198,7 +1198,7 @@ AllocSetFree(void *pointer)
 
                set = block->aset;
 
-               MEMORY_ACCOUNT_DEC_ALLOCATED(set, block->endptr - (char *) 
chunk);
+               MEMORY_ACCOUNT_DEC_ALLOCATED(set, block->endptr - (char *) 
chunk - ALLOC_CHUNKHDRSZ);
 
 #ifdef USE_ASSERT_CHECKING
        /*
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 78fdc1fa57e..c6818fdf71e 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -774,8 +774,6 @@ popen_check(const char *command, const char *mode)
 static void
 cleanup_directories_atexit(void)
 {
-       return;
-
        if (success)
                return;
 
diff --git a/src/include/catalog/pg_password_history.h 
b/src/include/catalog/pg_password_history.h
index 974c7ea48c6..ca732b7e632 100644
--- a/src/include/catalog/pg_password_history.h
+++ b/src/include/catalog/pg_password_history.h
@@ -39,7 +39,7 @@
  *             typedef struct FormData_pg_password_history
  * ----------------
  */
-CATALOG(pg_password_history,10141,PasswordHistoryRelationId) 
BKI_SHARED_RELATION BKI_ROWTYPE_OID(10142,PasswordHistoryRelation_Rowtype_Id) 
BKI_SCHEMA_MACRO
+CATALOG(pg_password_history,10141,PasswordHistoryRelationId) 
BKI_SHARED_RELATION BKI_ROWTYPE_OID(11144,PasswordHistoryRelation_Rowtype_Id) 
BKI_SCHEMA_MACRO
 {
        Oid             passhistroleid BKI_FORCE_NOT_NULL;      /* oid of role 
*/
 #ifdef CATALOG_VARLEN
diff --git a/src/include/catalog/pg_profile.h b/src/include/catalog/pg_profile.h
index 5cae3186596..bd56b9fe236 100644
--- a/src/include/catalog/pg_profile.h
+++ b/src/include/catalog/pg_profile.h
@@ -41,7 +41,7 @@
  *             typedef struct FormData_pg_profile
  * ----------------
  */
-CATALOG(pg_profile,10135,ProfileRelationId) BKI_SHARED_RELATION 
BKI_ROWTYPE_OID(10136,ProfileRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_profile,10135,ProfileRelationId) BKI_SHARED_RELATION 
BKI_ROWTYPE_OID(11145,ProfileRelation_Rowtype_Id) BKI_SCHEMA_MACRO
 {
        Oid             oid BKI_FORCE_NOT_NULL;         /* oid */
        NameData        prfname BKI_FORCE_NOT_NULL;     /* name of profile */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to