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 cb9c408bae4 Fix some conflict on utils/adt
cb9c408bae4 is described below

commit cb9c408bae416d4e801314dd52197a4ded544389
Author: Jinbao Chen <[email protected]>
AuthorDate: Tue Aug 12 09:33:45 2025 +0800

    Fix some conflict on utils/adt
---
 src/backend/utils/adt/array_userfuncs.c   |   4 -
 src/backend/utils/adt/arrayfuncs.c        |  10 +-
 src/backend/utils/adt/date.c              |   7 -
 src/backend/utils/adt/datetime.c          |  12 --
 src/backend/utils/adt/datum.c             |   3 -
 src/backend/utils/adt/dbsize.c            | 260 ++++++------------------------
 src/backend/utils/adt/encode.c            |  31 ----
 src/backend/utils/adt/formatting.c        |  22 +--
 src/backend/utils/adt/lockfuncs.c         |  24 +--
 src/backend/utils/adt/mcxtfuncs.c         |   5 -
 src/backend/utils/adt/misc.c              |   4 +-
 src/backend/utils/adt/numeric.c           |   3 -
 src/backend/utils/adt/pg_locale.c         |   3 -
 src/backend/utils/adt/pgstatfuncs.c       |  67 ++------
 src/backend/utils/adt/rangetypes_spgist.c |   5 -
 src/backend/utils/adt/rowtypes.c          |  38 -----
 src/backend/utils/adt/selfuncs.c          |  44 +----
 src/backend/utils/adt/tid.c               |   9 --
 src/backend/utils/adt/timestamp.c         |  76 +--------
 src/backend/utils/adt/tsvector_op.c       |   4 -
 src/backend/utils/adt/varchar.c           |  10 --
 src/backend/utils/adt/varlena.c           |   4 -
 22 files changed, 82 insertions(+), 563 deletions(-)

diff --git a/src/backend/utils/adt/array_userfuncs.c 
b/src/backend/utils/adt/array_userfuncs.c
index 9d819cb8d3e..331b59980e0 100644
--- a/src/backend/utils/adt/array_userfuncs.c
+++ b/src/backend/utils/adt/array_userfuncs.c
@@ -41,11 +41,7 @@ typedef struct SerialIOData
 typedef struct DeserialIOData
 {
        FmgrInfo        typreceive;
-<<<<<<< HEAD
-       Oid             typioparam;
-=======
        Oid                     typioparam;
->>>>>>> REL_16_9
 } DeserialIOData;
 
 static Datum array_position_common(FunctionCallInfo fcinfo);
diff --git a/src/backend/utils/adt/arrayfuncs.c 
b/src/backend/utils/adt/arrayfuncs.c
index c67272b7829..3f4c267c00a 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -4280,12 +4280,8 @@ hash_array(PG_FUNCTION_ARGS)
 
                        /*
                         * Make fake type cache entry structure.  Note that we 
can't just
-<<<<<<< HEAD
-                        * modify typentry, since that points directly into the 
type cache.
-=======
                         * modify typentry, since that points directly into the 
type
                         * cache.
->>>>>>> REL_16_9
                         */
                        record_typentry = palloc0(sizeof(*record_typentry));
                        record_typentry->type_id = element_type;
@@ -5387,13 +5383,9 @@ initArrayResult(Oid element_type, MemoryContext 
rcontext, bool subcontext)
  *             to be specified.
  */
 ArrayBuildState *
-<<<<<<< HEAD
-initArrayResultWithSize(Oid element_type, MemoryContext rcontext, bool 
subcontext, int initsize)
-=======
 initArrayResultWithSize(Oid element_type, MemoryContext rcontext,
                                                bool subcontext, int initsize)
->>>>>>> REL_16_9
-{
+ {
        ArrayBuildState *astate;
        MemoryContext arr_context = rcontext;
 
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index fa760351d51..07afa34a84c 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -3139,14 +3139,7 @@ timetz_zone(PG_FUNCTION_ARGS)
                TimestampTz now = GetCurrentTransactionStartTimestamp();
                int                     isdst;
 
-<<<<<<< HEAD
-               tm = pg_localtime(&now, tzp);
-               tm->tm_year += 1900;    /* adjust to PG conventions */
-               tm->tm_mon += 1;
-               tz = DetermineTimeZoneAbbrevOffset(tm, tzname, tzp);
-=======
                tz = DetermineTimeZoneAbbrevOffsetTS(now, tzname, tzp, &isdst);
->>>>>>> REL_16_9
        }
        else
        {
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 2cb5bdba2ca..bb69cd60dbc 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -35,7 +35,6 @@
 #include "utils/memutils.h"
 #include "utils/tzparser.h"
 
-<<<<<<< HEAD
 /*
  * We don't support locale-aware month names or day-of-week names, or 
non-arabic numbers,
  * and we know the only alpha or numeric chars we can handle are in the ASCII7 
set.
@@ -49,10 +48,7 @@
 #undef isalnum
 #define isalnum(x) (isalpha(x) || isdigit(x))
 
-static int     DecodeNumber(int flen, char *field, bool haveTextMonth,
-=======
 static int     DecodeNumber(int flen, char *str, bool haveTextMonth,
->>>>>>> REL_16_9
                                                 int fmask, int *tmask,
                                                 struct pg_tm *tm, fsec_t 
*fsec, bool *is2digits);
 static int     DecodeNumberField(int len, char *str,
@@ -68,13 +64,6 @@ static const datetkn *datebsearch(const char *key, const 
datetkn *base, int nel)
 static int     DecodeDate(char *str, int fmask, int *tmask, bool *is2digits,
                                           struct pg_tm *tm);
 static char *AppendSeconds(char *cp, int sec, fsec_t fsec,
-<<<<<<< HEAD
-                           int precision, bool fillzeros);
-static void AdjustFractSeconds(double frac, struct pg_tm *tm, fsec_t *fsec,
-                                                          int scale);
-static void AdjustFractDays(double frac, struct pg_tm *tm, fsec_t *fsec,
-                                                       int scale);
-=======
                                                   int precision, bool 
fillzeros);
 static bool int64_multiply_add(int64 val, int64 multiplier, int64 *sum);
 static bool AdjustFractMicroseconds(double frac, int64 scale,
@@ -90,7 +79,6 @@ static bool AdjustDays(int64 val, int scale,
 static bool AdjustMonths(int64 val, struct pg_itm_in *itm_in);
 static bool AdjustYears(int64 val, int scale,
                                                struct pg_itm_in *itm_in);
->>>>>>> REL_16_9
 static int     DetermineTimeZoneOffsetInternal(struct pg_tm *tm, pg_tz *tzp,
                                                                                
        pg_time_t *tp);
 static bool DetermineTimeZoneAbbrevOffsetInternal(pg_time_t t,
diff --git a/src/backend/utils/adt/datum.c b/src/backend/utils/adt/datum.c
index 13581546de6..07af6569ae6 100644
--- a/src/backend/utils/adt/datum.c
+++ b/src/backend/utils/adt/datum.c
@@ -43,10 +43,7 @@
 #include "postgres.h"
 
 #include "access/detoast.h"
-<<<<<<< HEAD
-=======
 #include "catalog/pg_type_d.h"
->>>>>>> REL_16_9
 #include "common/hashfn.h"
 #include "fmgr.h"
 #include "utils/builtins.h"
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index a1bf9c7b5a7..c4a528d0764 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -35,7 +35,6 @@
 #include "utils/lsyscache.h"
 #include "utils/numeric.h"
 #include "utils/rel.h"
-<<<<<<< HEAD
 #include "utils/relcache.h"
 #include "utils/relfilenodemap.h"
 #include "utils/relmapper.h"
@@ -51,10 +50,48 @@
 #include "cdb/cdbvars.h"
 #include "cdb/cdbutil.h"
 #include "utils/snapmgr.h"
+#include "utils/relfilenumbermap.h"
+#include "utils/relmapper.h"
+#include "utils/syscache.h"
 
 /* Divide by two and round away from zero */
 #define half_rounded(x)   (((x) + ((x) < 0 ? -1 : 1)) / 2)
 
+/* Units used in pg_size_pretty functions.  All units must be powers of 2 */
+struct size_pretty_unit
+{
+       const char *name;                       /* bytes, kB, MB, GB etc */
+       uint32          limit;                  /* upper limit, prior to half 
rounding after
+                                                                * converting 
to this unit. */
+       bool            round;                  /* do half rounding for this 
unit */
+       uint8           unitbits;               /* (1 << unitbits) bytes to 
make 1 of this
+                                                                * unit */
+};
+
+/* When adding units here also update the docs and the error message in 
pg_size_bytes */
+static const struct size_pretty_unit size_pretty_units[] = {
+               {"bytes", 10 * 1024, false, 0},
+               {"kB", 20 * 1024 - 1, true, 10},
+               {"MB", 20 * 1024 - 1, true, 20},
+               {"GB", 20 * 1024 - 1, true, 30},
+               {"TB", 20 * 1024 - 1, true, 40},
+               {"PB", 20 * 1024 - 1, true, 50},
+               {NULL, 0, false, 0}
+};
+
+/* Additional unit aliases accepted by pg_size_bytes */
+struct size_bytes_unit_alias
+{
+       const char *alias;
+       int                     unit_index;             /* corresponding 
size_pretty_units element */
+};
+
+/* When adding units here also update the docs and the error message in 
pg_size_bytes */
+static const struct size_bytes_unit_alias size_bytes_aliases[] = {
+               {"B", 0},
+               {NULL}
+};
+
 static int64 calculate_total_relation_size(Relation rel);
 static HTAB *cbdb_get_size_from_segDBs(const char *cmd, int32 relnum);
 
@@ -129,49 +166,6 @@ get_size_from_segDBs(const char *cmd)
 
        return result;
 }
-=======
-#include "utils/relfilenumbermap.h"
-#include "utils/relmapper.h"
-#include "utils/syscache.h"
-
-/* Divide by two and round away from zero */
-#define half_rounded(x)   (((x) + ((x) < 0 ? -1 : 1)) / 2)
-
-/* Units used in pg_size_pretty functions.  All units must be powers of 2 */
-struct size_pretty_unit
-{
-       const char *name;                       /* bytes, kB, MB, GB etc */
-       uint32          limit;                  /* upper limit, prior to half 
rounding after
-                                                                * converting 
to this unit. */
-       bool            round;                  /* do half rounding for this 
unit */
-       uint8           unitbits;               /* (1 << unitbits) bytes to 
make 1 of this
-                                                                * unit */
-};
-
-/* When adding units here also update the docs and the error message in 
pg_size_bytes */
-static const struct size_pretty_unit size_pretty_units[] = {
-       {"bytes", 10 * 1024, false, 0},
-       {"kB", 20 * 1024 - 1, true, 10},
-       {"MB", 20 * 1024 - 1, true, 20},
-       {"GB", 20 * 1024 - 1, true, 30},
-       {"TB", 20 * 1024 - 1, true, 40},
-       {"PB", 20 * 1024 - 1, true, 50},
-       {NULL, 0, false, 0}
-};
-
-/* Additional unit aliases accepted by pg_size_bytes */
-struct size_bytes_unit_alias
-{
-       const char *alias;
-       int                     unit_index;             /* corresponding 
size_pretty_units element */
-};
-
-/* When adding units here also update the docs and the error message in 
pg_size_bytes */
-static const struct size_bytes_unit_alias size_bytes_aliases[] = {
-       {"B", 0},
-       {NULL}
-};
->>>>>>> REL_16_9
 
 /* Return physical size of directory contents, or 0 if dir doesn't exist */
 static int64
@@ -496,11 +490,7 @@ pg_tablespace_size_name(PG_FUNCTION_ARGS)
  * is no check here or at the call sites for that.
  */
 static int64
-<<<<<<< HEAD
-calculate_relation_size(Relation rel, ForkNumber forknum)
-=======
 calculate_relation_size(RelFileLocator *rfn, BackendId backend, ForkNumber 
forknum)
->>>>>>> REL_16_9
 {
        int64           totalsize = 0;
        char       *relationpath;
@@ -576,7 +566,6 @@ pg_relation_size(PG_FUNCTION_ARGS)
        if (rel == NULL)
                PG_RETURN_NULL();
 
-<<<<<<< HEAD
        if (rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE)
        {
                FdwRoutine *fdwroutine;
@@ -612,10 +601,6 @@ pg_relation_size(PG_FUNCTION_ARGS)
 
                size += get_size_from_segDBs(sql);
        }
-=======
-       size = calculate_relation_size(&(rel->rd_locator), rel->rd_backend,
-                                                                  
forkname_to_number(text_to_cstring(forkName)));
->>>>>>> REL_16_9
 
        relation_close(rel, AccessShareLock);
 
@@ -639,12 +624,8 @@ calculate_toast_table_size(Oid toastrelid)
 
        /* toast heap size, including FSM and VM size */
        for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
-<<<<<<< HEAD
-               size += calculate_relation_size(toastRel, forkNum);
-=======
                size += calculate_relation_size(&(toastRel->rd_locator),
                                                                                
toastRel->rd_backend, forkNum);
->>>>>>> REL_16_9
 
        /* toast index size, including FSM and VM size */
        indexlist = RelationGetIndexList(toastRel);
@@ -657,12 +638,8 @@ calculate_toast_table_size(Oid toastrelid)
                toastIdxRel = relation_open(lfirst_oid(lc),
                                                                        
AccessShareLock);
                for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
-<<<<<<< HEAD
-                       size += calculate_relation_size(toastIdxRel, forkNum);
-=======
                        size += 
calculate_relation_size(&(toastIdxRel->rd_locator),
                                                                                
        toastIdxRel->rd_backend, forkNum);
->>>>>>> REL_16_9
 
                relation_close(toastIdxRel, AccessShareLock);
        }
@@ -693,17 +670,11 @@ calculate_table_size(Relation rel)
        /*
         * heap size, including FSM and VM
         */
-<<<<<<< HEAD
-       if (rel->rd_node.relNode != 0)
+       if (rel->rd_locator.relNumber != 0)
        {
                for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
-                       size += calculate_relation_size(rel, forkNum);
+                       size += calculate_relation_size(rel, rel->rd_backend, 
forkNum);
        }
-=======
-       for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
-               size += calculate_relation_size(&(rel->rd_locator), 
rel->rd_backend,
-                                                                               
forkNum);
->>>>>>> REL_16_9
 
        /*
         * Size of toast relation
@@ -771,17 +742,12 @@ calculate_indexes_size(Relation rel)
 
                        idxRel = try_relation_open(idxOid, AccessShareLock, 
false);
 
-<<<<<<< HEAD
                        if (RelationIsValid(idxRel))
                        {
                                for (forkNum = 0; forkNum <= MAX_FORKNUM; 
forkNum++)
-                                       size += calculate_relation_size(idxRel, 
forkNum);
-=======
-                       for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
-                               size += 
calculate_relation_size(&(idxRel->rd_locator),
-                                                                               
                idxRel->rd_backend,
-                                                                               
                forkNum);
->>>>>>> REL_16_9
+                                       size += 
calculate_relation_size(&(idxRel->rd_locator),
+                                                                               
                        idxRel->rd_backend,
+                                                                               
                        forkNum);
 
                                relation_close(idxRel, AccessShareLock);
                        }
@@ -927,35 +893,6 @@ pg_size_pretty(PG_FUNCTION_ARGS)
 
        for (unit = size_pretty_units; unit->name != NULL; unit++)
        {
-<<<<<<< HEAD
-               /*
-                * We use divide instead of bit shifting so that behavior 
matches for
-                * both positive and negative size values.
-                */
-               size /= (1 << 9);               /* keep one extra bit for 
rounding */
-               if (Abs(size) < limit2)
-                       snprintf(buf, sizeof(buf), INT64_FORMAT " kB",
-                                        half_rounded(size));
-               else
-               {
-                       size /= (1 << 10);
-                       if (Abs(size) < limit2)
-                               snprintf(buf, sizeof(buf), INT64_FORMAT " MB",
-                                                half_rounded(size));
-                       else
-                       {
-                               size /= (1 << 10);
-                               if (Abs(size) < limit2)
-                                       snprintf(buf, sizeof(buf), INT64_FORMAT 
" GB",
-                                                        half_rounded(size));
-                               else
-                               {
-                                       size /= (1 << 10);
-                                       snprintf(buf, sizeof(buf), INT64_FORMAT 
" TB",
-                                                        half_rounded(size));
-                               }
-                       }
-=======
                uint8           bits;
                uint64          abs_size = size < 0 ? 0 - (uint64) size : 
(uint64) size;
 
@@ -970,7 +907,6 @@ pg_size_pretty(PG_FUNCTION_ARGS)
 
                        snprintf(buf, sizeof(buf), INT64_FORMAT " %s", size, 
unit->name);
                        break;
->>>>>>> REL_16_9
                }
 
                /*
@@ -1060,62 +996,18 @@ pg_size_pretty_numeric(PG_FUNCTION_ARGS)
 
        for (unit = size_pretty_units; unit->name != NULL; unit++)
        {
-<<<<<<< HEAD
-               result = psprintf("%s bytes", numeric_to_cstring(size));
-       }
-       else
-       {
-               /* keep one extra bit for rounding */
-               /* size /= (1 << 9) */
-               size = numeric_truncated_divide(size, 1 << 9);
-=======
                unsigned int shiftby;
->>>>>>> REL_16_9
 
                /* use this unit if there are no more units or we're below the 
limit */
                if (unit[1].name == NULL ||
                        numeric_is_less(numeric_absolute(size),
                                                        
int64_to_numeric(unit->limit)))
                {
-<<<<<<< HEAD
-                       size = numeric_half_rounded(size);
-                       result = psprintf("%s kB", numeric_to_cstring(size));
-               }
-               else
-               {
-                       /* size /= (1 << 10) */
-                       size = numeric_truncated_divide(size, 1 << 10);
-
-                       if (numeric_is_less(numeric_absolute(size), limit2))
-                       {
-                               size = numeric_half_rounded(size);
-                               result = psprintf("%s MB", 
numeric_to_cstring(size));
-                       }
-                       else
-                       {
-                               /* size /= (1 << 10) */
-                               size = numeric_truncated_divide(size, 1 << 10);
-
-                               if (numeric_is_less(numeric_absolute(size), 
limit2))
-                               {
-                                       size = numeric_half_rounded(size);
-                                       result = psprintf("%s GB", 
numeric_to_cstring(size));
-                               }
-                               else
-                               {
-                                       /* size /= (1 << 10) */
-                                       size = numeric_truncated_divide(size, 1 
<< 10);
-                                       size = numeric_half_rounded(size);
-                                       result = psprintf("%s TB", 
numeric_to_cstring(size));
-                               }
-                       }
-=======
                        if (unit->round)
                                size = numeric_half_rounded(size);
 
                        result = psprintf("%s %s", numeric_to_cstring(size), 
unit->name);
                        break;
->>>>>>> REL_16_9
                }
 
                /*
@@ -1306,11 +1198,7 @@ Datum
 pg_relation_filenode(PG_FUNCTION_ARGS)
 {
        Oid                     relid = PG_GETARG_OID(0);
-<<<<<<< HEAD
-       Oid             result;
-=======
        RelFileNumber result;
->>>>>>> REL_16_9
        HeapTuple       tuple;
        Form_pg_class relform;
 
@@ -1321,7 +1209,6 @@ pg_relation_filenode(PG_FUNCTION_ARGS)
 
        switch (relform->relkind)
        {
-<<<<<<< HEAD
                case RELKIND_RELATION:
                case RELKIND_MATVIEW:
                case RELKIND_INDEX:
@@ -1343,18 +1230,6 @@ pg_relation_filenode(PG_FUNCTION_ARGS)
                        /* no storage, return NULL */
                        result = InvalidOid;
                        break;
-=======
-               if (relform->relfilenode)
-                       result = relform->relfilenode;
-               else                                    /* Consult the relation 
mapper */
-                       result = RelationMapOidToFilenumber(relid,
-                                                                               
                relform->relisshared);
-       }
-       else
-       {
-               /* no storage, return NULL */
-               result = InvalidRelFileNumber;
->>>>>>> REL_16_9
        }
 
        ReleaseSysCache(tuple);
@@ -1382,11 +1257,7 @@ Datum
 pg_filenode_relation(PG_FUNCTION_ARGS)
 {
        Oid                     reltablespace = PG_GETARG_OID(0);
-<<<<<<< HEAD
-       Oid             relfilenode = PG_GETARG_OID(1);
-=======
        RelFileNumber relfilenumber = PG_GETARG_OID(1);
->>>>>>> REL_16_9
        Oid                     heaprel;
 
        /* test needed so RelidByRelfilenumber doesn't misbehave */
@@ -1423,7 +1294,6 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
 
        switch (relform->relkind)
        {
-<<<<<<< HEAD
                case RELKIND_RELATION:
                case RELKIND_MATVIEW:
                case RELKIND_INDEX:
@@ -1437,51 +1307,27 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
 
                        /* This logic should match RelationInitPhysicalAddr */
                        if (relform->reltablespace)
-                               rnode.spcNode = relform->reltablespace;
+                               rlocator.spcOid = relform->reltablespace;
                        else
-                               rnode.spcNode = MyDatabaseTableSpace;
-                       if (rnode.spcNode == GLOBALTABLESPACE_OID)
-                               rnode.dbNode = InvalidOid;
+                               rlocator.spcOid = MyDatabaseTableSpace;
+                       if (rlocator.spcOid == GLOBALTABLESPACE_OID)
+                               rlocator.dbOid = InvalidOid;
                        else
-                               rnode.dbNode = MyDatabaseId;
+                               rlocator.dbOid = MyDatabaseId;
                        if (relform->relfilenode)
-                               rnode.relNode = relform->relfilenode;
+                               rlocator.relNumber = relform->relfilenode;
                        else                            /* Consult the relation 
mapper */
-                               rnode.relNode = RelationMapOidToFilenode(relid,
+                               rlocator.relNumber = 
RelationMapOidToFilenode(relid,
                                                                                
                                 relform->relisshared);
                        break;
 
                default:
                        /* no storage, return NULL */
-                       rnode.relNode = InvalidOid;
+                       rlocator.relNumber = InvalidOid;
                        /* some compilers generate warnings without these next 
two lines */
-                       rnode.dbNode = InvalidOid;
-                       rnode.spcNode = InvalidOid;
-                       break;
-=======
-               /* This logic should match RelationInitPhysicalAddr */
-               if (relform->reltablespace)
-                       rlocator.spcOid = relform->reltablespace;
-               else
-                       rlocator.spcOid = MyDatabaseTableSpace;
-               if (rlocator.spcOid == GLOBALTABLESPACE_OID)
                        rlocator.dbOid = InvalidOid;
-               else
-                       rlocator.dbOid = MyDatabaseId;
-               if (relform->relfilenode)
-                       rlocator.relNumber = relform->relfilenode;
-               else                                    /* Consult the relation 
mapper */
-                       rlocator.relNumber = RelationMapOidToFilenumber(relid,
-                                                                               
                                        relform->relisshared);
-       }
-       else
-       {
-               /* no storage, return NULL */
-               rlocator.relNumber = InvalidRelFileNumber;
-               /* some compilers generate warnings without these next two 
lines */
-               rlocator.dbOid = InvalidOid;
-               rlocator.spcOid = InvalidOid;
->>>>>>> REL_16_9
+                       rlocator.spcOid = InvalidOid;
+                       break;
        }
 
        if (!RelFileNumberIsValid(rlocator.relNumber))
diff --git a/src/backend/utils/adt/encode.c b/src/backend/utils/adt/encode.c
index 101badf4938..e5ac3ad23df 100644
--- a/src/backend/utils/adt/encode.c
+++ b/src/backend/utils/adt/encode.c
@@ -172,13 +172,8 @@ hex_encode(const char *src, size_t len, char *dst)
        return (uint64) len * 2;
 }
 
-<<<<<<< HEAD
-static inline char
-get_hex(const char *cp)
-=======
 static inline bool
 get_hex(const char *cp, char *out)
->>>>>>> REL_16_9
 {
        unsigned char c = (unsigned char) *cp;
        int                     res = -1;
@@ -186,33 +181,20 @@ get_hex(const char *cp, char *out)
        if (c < 127)
                res = hexlookup[c];
 
-<<<<<<< HEAD
-       if (res < 0)
-               ereport(ERROR,
-                               (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("invalid hexadecimal digit: \"%.*s\"",
-                                               pg_mblen(cp), cp)));
-
-       return (char) res;
-=======
        *out = (char) res;
 
        return (res >= 0);
->>>>>>> REL_16_9
 }
 
 uint64
 hex_decode(const char *src, size_t len, char *dst)
 {
-<<<<<<< HEAD
-=======
        return hex_decode_safe(src, len, dst, NULL);
 }
 
 uint64
 hex_decode_safe(const char *src, size_t len, char *dst, Node *escontext)
 {
->>>>>>> REL_16_9
        const char *s,
                           *srcend;
        char            v1,
@@ -229,18 +211,6 @@ hex_decode_safe(const char *src, size_t len, char *dst, 
Node *escontext)
                        s++;
                        continue;
                }
-<<<<<<< HEAD
-               v1 = get_hex(s) << 4;
-               s++;
-               if (s >= srcend)
-                       ereport(ERROR,
-                                       
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                        errmsg("invalid hexadecimal data: odd 
number of digits")));
-
-               v2 = get_hex(s);
-               s++;
-               *p++ = v1 | v2;
-=======
                if (!get_hex(s, &v1))
                        ereturn(escontext, 0,
                                        
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@@ -258,7 +228,6 @@ hex_decode_safe(const char *src, size_t len, char *dst, 
Node *escontext)
                                                        pg_mblen(s), s)));
                s++;
                *p++ = (v1 << 4) | v2;
->>>>>>> REL_16_9
        }
 
        return p - dst;
diff --git a/src/backend/utils/adt/formatting.c 
b/src/backend/utils/adt/formatting.c
index 3a2242246f8..5b5dd1cd53f 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -4570,7 +4570,6 @@ do_to_timestamp(text *date_txt, text *fmt, Oid collid, 
bool std,
        {
                if (tm->tm_hour < 1 || tm->tm_hour > HOURS_PER_DAY / 2)
                {
-<<<<<<< HEAD
             /*
              * GPDB_13_MERGE_FIXME: The IF branch is from the GPDB specific 
behavior.
              * It will not raise an error if the hour is greater than 12
@@ -4606,19 +4605,14 @@ HINT:  Use the 24-hour clock, or give an hour between 1 
and 12.
                                tm->tm_hour = tm->tm_hour - HOURS_PER_DAY / 2;
                        }
                        else
-                       RETURN_ERROR(ereport(ERROR,
-                                                                
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
-                                                                 errmsg("hour 
\"%d\" is invalid for the 12-hour clock",
-                                                                               
 tm->tm_hour),
-                                                                 errhint("Use 
the 24-hour clock, or give an hour between 1 and 12."))));
-=======
-                       errsave(escontext,
-                                       
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
-                                        errmsg("hour \"%d\" is invalid for the 
12-hour clock",
-                                                       tm->tm_hour),
-                                        errhint("Use the 24-hour clock, or 
give an hour between 1 and 12.")));
-                       goto fail;
->>>>>>> REL_16_9
+                       {
+                               errsave(escontext,
+                                               
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
+                                                               errmsg("hour 
\"%d\" is invalid for the 12-hour clock",
+                                                                          
tm->tm_hour),
+                                                               errhint("Use 
the 24-hour clock, or give an hour between 1 and 12.")));
+                               goto fail;
+                       }
                }
 
                if (tmfc.pm && tm->tm_hour < HOURS_PER_DAY / 2)
diff --git a/src/backend/utils/adt/lockfuncs.c 
b/src/backend/utils/adt/lockfuncs.c
index 6613a7a73c4..72c770a72c7 100644
--- a/src/backend/utils/adt/lockfuncs.c
+++ b/src/backend/utils/adt/lockfuncs.c
@@ -44,17 +44,11 @@ const char *const LockTagTypeNames[] = {
        "distributed xid",
        "userlock",
        "advisory",
-<<<<<<< HEAD
+       "applytransaction"
        "warehouse"
 };
 
 StaticAssertDecl(lengthof(LockTagTypeNames) == (LOCKTAG_WAREHOUSE + 1),
-=======
-       "applytransaction"
-};
-
-StaticAssertDecl(lengthof(LockTagTypeNames) == (LOCKTAG_LAST_TYPE + 1),
->>>>>>> REL_16_9
                                 "array length mismatch");
 
 /* This must match enum PredicateLockTargetType (predicate_internals.h) */
@@ -463,7 +457,6 @@ pg_lock_status(PG_FUNCTION_ARGS)
                                nulls[8] = true;
                                nulls[9] = true;
                                break;
-<<<<<<< HEAD
                        case LOCKTAG_RESOURCE_QUEUE:
                        case LOCKTAG_WAREHOUSE:
 #if 0
@@ -471,23 +464,19 @@ pg_lock_status(PG_FUNCTION_ARGS)
 #endif
                                nulls[1] = true;
                                values[8] = 
ObjectIdGetDatum(instance->locktag.locktag_field1);
-=======
-                       case LOCKTAG_SPECULATIVE_TOKEN:
-                               values[6] =
-                                       
TransactionIdGetDatum(instance->locktag.locktag_field1);
-                               values[8] = 
ObjectIdGetDatum(instance->locktag.locktag_field2);
-                               nulls[1] = true;
->>>>>>> REL_16_9
                                nulls[2] = true;
                                nulls[3] = true;
                                nulls[4] = true;
                                nulls[5] = true;
-<<<<<<< HEAD
                                nulls[6] = true;
                                nulls[7] = true;
                                nulls[9] = true;
                                break;
-=======
+                       case LOCKTAG_SPECULATIVE_TOKEN:
+                               values[6] =
+                                       
TransactionIdGetDatum(instance->locktag.locktag_field1);
+                               values[8] = 
ObjectIdGetDatum(instance->locktag.locktag_field2);
+                               nulls[1] = true;
                                nulls[7] = true;
                                nulls[9] = true;
                                break;
@@ -502,7 +491,6 @@ pg_lock_status(PG_FUNCTION_ARGS)
                                nulls[5] = true;
                                nulls[7] = true;
                                break;
->>>>>>> REL_16_9
                        case LOCKTAG_OBJECT:
                        case LOCKTAG_USERLOCK:
                        case LOCKTAG_ADVISORY:
diff --git a/src/backend/utils/adt/mcxtfuncs.c 
b/src/backend/utils/adt/mcxtfuncs.c
index 993d29dea74..a9b734b197d 100644
--- a/src/backend/utils/adt/mcxtfuncs.c
+++ b/src/backend/utils/adt/mcxtfuncs.c
@@ -164,16 +164,11 @@ pg_get_backend_memory_contexts(PG_FUNCTION_ARGS)
 Datum
 pg_log_backend_memory_contexts(PG_FUNCTION_ARGS)
 {
-<<<<<<< HEAD
-       int             pid = PG_GETARG_INT32(0);
-       PGPROC          *proc = BackendPidGetProc(pid);
-=======
        int                     pid = PG_GETARG_INT32(0);
        PGPROC     *proc;
        BackendId       backendId = InvalidBackendId;
 
        proc = BackendPidGetProc(pid);
->>>>>>> REL_16_9
 
        /*
         * See if the process with given pid is a backend or an auxiliary 
process.
diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c
index c41aad5a252..699b9a14829 100644
--- a/src/backend/utils/adt/misc.c
+++ b/src/backend/utils/adt/misc.c
@@ -1089,7 +1089,6 @@ pg_get_replica_identity_index(PG_FUNCTION_ARGS)
                PG_RETURN_NULL();
 }
 
-<<<<<<< HEAD
 Datum
 gp_get_segment_configuration(PG_FUNCTION_ARGS)
 {
@@ -1185,7 +1184,7 @@ gp_get_segment_configuration(PG_FUNCTION_ARGS)
                SRF_RETURN_DONE(funcctx);
        }
 #endif
-=======
+
 /*
  * Transition function for the ANY_VALUE aggregate
  */
@@ -1193,5 +1192,4 @@ Datum
 any_value_transfn(PG_FUNCTION_ARGS)
 {
        PG_RETURN_DATUM(PG_GETARG_DATUM(0));
->>>>>>> REL_16_9
 }
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index a9299500374..09388528d1e 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -40,11 +40,8 @@
 #include "utils/builtins.h"
 #include "utils/float.h"
 #include "utils/guc.h"
-<<<<<<< HEAD
 #include "utils/int8.h"
 #include "utils/memutils.h"
-=======
->>>>>>> REL_16_9
 #include "utils/numeric.h"
 #include "utils/pg_lsn.h"
 #include "utils/sortsupport.h"
diff --git a/src/backend/utils/adt/pg_locale.c 
b/src/backend/utils/adt/pg_locale.c
index e5b7c8c8e30..c984e81c050 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -59,11 +59,8 @@
 #include "catalog/pg_control.h"
 #include "common/string.h"
 #include "mb/pg_wchar.h"
-<<<<<<< HEAD
 #include "utils/faultinjector.h"
-=======
 #include "miscadmin.h"
->>>>>>> REL_16_9
 #include "utils/builtins.h"
 #include "utils/formatting.h"
 #include "utils/guc_hooks.h"
diff --git a/src/backend/utils/adt/pgstatfuncs.c 
b/src/backend/utils/adt/pgstatfuncs.c
index 557d22219d9..6c102945c5f 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -312,11 +312,7 @@ pg_stat_get_progress_info(PG_FUNCTION_ARGS)
 Datum
 pg_stat_get_activity(PG_FUNCTION_ARGS)
 {
-<<<<<<< HEAD
-#define PG_STAT_GET_ACTIVITY_COLS      34
-=======
-#define PG_STAT_GET_ACTIVITY_COLS      31
->>>>>>> REL_16_9
+#define PG_STAT_GET_ACTIVITY_COLS      35
        int                     num_backends = pgstat_fetch_stat_numbackends();
        int                     curr_backend;
        int                     pid = PG_ARGISNULL(0) ? -1 : PG_GETARG_INT32(0);
@@ -643,29 +639,25 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
                        if (beentry->st_query_id == 0)
                                nulls[30] = true;
                        else
-<<<<<<< HEAD
-                               values[29] = 
UInt64GetDatum(beentry->st_query_id);
+                               values[30] = 
UInt64GetDatum(beentry->st_query_id);
 
-                       values[30] = Int32GetDatum(beentry->st_session_id);  /* 
GPDB */
+                       values[31] = Int32GetDatum(beentry->st_session_id);  /* 
GPDB */
 
                        {
                                char *groupName = 
GetResGroupNameForId(beentry->st_rsgid);
 
-                               values[31] = 
ObjectIdGetDatum(beentry->st_rsgid);
+                               values[32] = 
ObjectIdGetDatum(beentry->st_rsgid);
 
                                if (groupName != NULL)
-                                       values[32] = 
CStringGetTextDatum(groupName);
+                                       values[33] = 
CStringGetTextDatum(groupName);
                                else
-                                       nulls[32] = true;
+                                       nulls[33] = true;
                        }
 
                        if (beentry->st_warehouse_id != InvalidOid)
-                               values[33] = 
ObjectIdGetDatum(beentry->st_warehouse_id);
+                               values[34] = 
ObjectIdGetDatum(beentry->st_warehouse_id);
                        else
-                               nulls[33] = true;
-=======
-                               values[30] = 
UInt64GetDatum(beentry->st_query_id);
->>>>>>> REL_16_9
+                               nulls[34] = true;
                }
                else
                {
@@ -694,16 +686,13 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
                        nulls[27] = true;
                        nulls[28] = true;
                        nulls[29] = true;
-<<<<<<< HEAD
+                       nulls[30] = true;
 
             /* GPDB specific values */
-                       values[30] = Int32GetDatum(beentry->st_session_id);
-                       nulls[31] = true;
+                       values[31] = Int32GetDatum(beentry->st_session_id);
                        nulls[32] = true;
                        nulls[33] = true;
-=======
-                       nulls[30] = true;
->>>>>>> REL_16_9
+                       nulls[34] = true;
                }
 
                tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, 
values, nulls);
@@ -1610,13 +1599,8 @@ pg_stat_get_slru(PG_FUNCTION_ARGS)
        for (i = 0;; i++)
        {
                /* for each row */
-<<<<<<< HEAD
-               Datum           values[PG_STAT_GET_SLRU_COLS];
-               bool            nulls[PG_STAT_GET_SLRU_COLS];
-=======
                Datum           values[PG_STAT_GET_SLRU_COLS] = {0};
                bool            nulls[PG_STAT_GET_SLRU_COLS] = {0};
->>>>>>> REL_16_9
                PgStat_SLRUStats stat;
                const char *name;
 
@@ -1626,11 +1610,6 @@ pg_stat_get_slru(PG_FUNCTION_ARGS)
                        break;
 
                stat = stats[i];
-<<<<<<< HEAD
-               MemSet(values, 0, sizeof(values));
-               MemSet(nulls, 0, sizeof(nulls));
-=======
->>>>>>> REL_16_9
 
                values[0] = PointerGetDatum(cstring_to_text(name));
                values[1] = Int64GetDatum(stat.blocks_zeroed);
@@ -1802,7 +1781,6 @@ pg_stat_clear_snapshot(PG_FUNCTION_ARGS)
 }
 
 
-<<<<<<< HEAD
 Datum
 pg_stat_get_queue_num_exec(PG_FUNCTION_ARGS)
 {
@@ -1891,7 +1869,6 @@ pg_renice_session(PG_FUNCTION_ARGS)
        PG_RETURN_INT32(prio_out);
 }
 
-=======
 /* Force statistics to be reported at the next occasion */
 Datum
 pg_stat_force_next_flush(PG_FUNCTION_ARGS)
@@ -1902,7 +1879,6 @@ pg_stat_force_next_flush(PG_FUNCTION_ARGS)
 }
 
 
->>>>>>> REL_16_9
 /* Reset all counters for the current database */
 Datum
 pg_stat_reset(PG_FUNCTION_ARGS)
@@ -2106,32 +2082,11 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
        text       *slotname_text;
        NameData        slotname;
        TupleDesc       tupdesc;
-<<<<<<< HEAD
-       Datum           values[PG_STAT_GET_REPLICATION_SLOT_COLS];
-       bool            nulls[PG_STAT_GET_REPLICATION_SLOT_COLS];
-       PgStat_StatReplSlotEntry *slotent;
-       PgStat_StatReplSlotEntry allzero;
-
-       /*
-        * Function was accidentally marked as non-strict, can't change that 
post
-        * release.
-        */
-       if (PG_ARGISNULL(0))
-               PG_RETURN_NULL();
-
-       slotname_text = PG_GETARG_TEXT_P(0);
-
-       /* Initialise values and NULL flags arrays */
-       MemSet(values, 0, sizeof(values));
-       MemSet(nulls, 0, sizeof(nulls));
-
-=======
        Datum           values[PG_STAT_GET_REPLICATION_SLOT_COLS] = {0};
        bool            nulls[PG_STAT_GET_REPLICATION_SLOT_COLS] = {0};
        PgStat_StatReplSlotEntry *slotent;
        PgStat_StatReplSlotEntry allzero;
 
->>>>>>> REL_16_9
        /* Initialise attributes information in the tuple descriptor */
        tupdesc = CreateTemplateTupleDesc(PG_STAT_GET_REPLICATION_SLOT_COLS);
        TupleDescInitEntry(tupdesc, (AttrNumber) 1, "slot_name",
diff --git a/src/backend/utils/adt/rangetypes_spgist.c 
b/src/backend/utils/adt/rangetypes_spgist.c
index baf1f62c0a5..834ee0bbd05 100644
--- a/src/backend/utils/adt/rangetypes_spgist.c
+++ b/src/backend/utils/adt/rangetypes_spgist.c
@@ -608,13 +608,8 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS)
                                        /*
                                         * Non-empty range A contains non-empty 
range B if lower
                                         * bound of A is lower or equal to 
lower bound of range B
-<<<<<<< HEAD
-                                        * and upper bound of range A is 
greater than or equal to upper
-                                        * bound of range A.
-=======
                                         * and upper bound of range A is 
greater than or equal to
                                         * upper bound of range A.
->>>>>>> REL_16_9
                                         *
                                         * All non-empty ranges contain an 
empty range.
                                         */
diff --git a/src/backend/utils/adt/rowtypes.c b/src/backend/utils/adt/rowtypes.c
index fdc6ef64948..7844da6ada3 100644
--- a/src/backend/utils/adt/rowtypes.c
+++ b/src/backend/utils/adt/rowtypes.c
@@ -154,19 +154,12 @@ record_in(PG_FUNCTION_ARGS)
                ptr++;
        if (*ptr++ != '(')
        {
-<<<<<<< HEAD
                ReleaseTupleDesc(tupdesc);
-               ereport(ERROR,
-                               (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
-                                errmsg("malformed record literal: \"%s\"", 
string),
-                                errdetail("Missing left parenthesis.")));
-=======
                errsave(escontext,
                                (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
                                 errmsg("malformed record literal: \"%s\"", 
string),
                                 errdetail("Missing left parenthesis.")));
                goto fail;
->>>>>>> REL_16_9
        }
 
        initStringInfo(&buf);
@@ -200,10 +193,7 @@ record_in(PG_FUNCTION_ARGS)
                                                
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
                                                 errmsg("malformed record 
literal: \"%s\"", string),
                                                 errdetail("Too few 
columns.")));
-<<<<<<< HEAD
-=======
                                goto fail;
->>>>>>> REL_16_9
                        }
                }
 
@@ -225,39 +215,25 @@ record_in(PG_FUNCTION_ARGS)
 
                                if (ch == '\0')
                                {
-<<<<<<< HEAD
                                        ReleaseTupleDesc(tupdesc);
-                                       ereport(ERROR,
-=======
                                        errsave(escontext,
->>>>>>> REL_16_9
                                                        
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
                                                         errmsg("malformed 
record literal: \"%s\"",
                                                                        string),
                                                         errdetail("Unexpected 
end of input.")));
-<<<<<<< HEAD
-=======
                                        goto fail;
->>>>>>> REL_16_9
                                }
                                if (ch == '\\')
                                {
                                        if (*ptr == '\0')
                                        {
-<<<<<<< HEAD
                                                ReleaseTupleDesc(tupdesc);
-                                               ereport(ERROR,
-=======
                                                errsave(escontext,
->>>>>>> REL_16_9
                                                                
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
                                                                 
errmsg("malformed record literal: \"%s\"",
                                                                                
string),
                                                                 
errdetail("Unexpected end of input.")));
-<<<<<<< HEAD
-=======
                                                goto fail;
->>>>>>> REL_16_9
                                        }
                                        appendStringInfoChar(&buf, *ptr++);
                                }
@@ -310,38 +286,24 @@ record_in(PG_FUNCTION_ARGS)
 
        if (*ptr++ != ')')
        {
-<<<<<<< HEAD
                ReleaseTupleDesc(tupdesc);
-               ereport(ERROR,
-                               (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
-                                errmsg("malformed record literal: \"%s\"", 
string),
-                                errdetail("Too many columns.")));
-=======
                errsave(escontext,
                                (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
                                 errmsg("malformed record literal: \"%s\"", 
string),
                                 errdetail("Too many columns.")));
                goto fail;
->>>>>>> REL_16_9
        }
        /* Allow trailing whitespace */
        while (*ptr && isspace((unsigned char) *ptr))
                ptr++;
        if (*ptr)
        {
-<<<<<<< HEAD
                ReleaseTupleDesc(tupdesc);
-               ereport(ERROR,
-                               (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
-                                errmsg("malformed record literal: \"%s\"", 
string),
-                                errdetail("Junk after right parenthesis.")));
-=======
                errsave(escontext,
                                (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
                                 errmsg("malformed record literal: \"%s\"", 
string),
                                 errdetail("Junk after right parenthesis.")));
                goto fail;
->>>>>>> REL_16_9
        }
 
        tuple = heap_form_tuple(tupdesc, values, nulls);
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 4495a90babe..b9fc6c9a5c0 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -10,13 +10,9 @@
  *       Index cost functions are located via the index AM's API struct,
  *       which is obtained from the handler function registered in pg_am.
  *
-<<<<<<< HEAD
  * Portions Copyright (c) 2006-2009, Greenplum inc
  * Portions Copyright (c) 2012-Present VMware, Inc. or its affiliates.
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-=======
  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
->>>>>>> REL_16_9
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
@@ -149,14 +145,12 @@
 #include "utils/timestamp.h"
 #include "utils/typcache.h"
 
-<<<<<<< HEAD
 #include "cdb/cdbgroup.h" /* cdbpathlocus_collocates_expressions */
 #include "cdb/cdbutil.h"
 #include "cdb/cdbvars.h"
 #include "optimizer/restrictinfo.h"
-=======
+
 #define DEFAULT_PAGE_CPU_MULTIPLIER 50.0
->>>>>>> REL_16_9
 
 /* Hooks for plugins to get control when we ask for stats */
 get_relation_stats_hook_type get_relation_stats_hook = NULL;
@@ -3977,30 +3971,12 @@ estimate_multivariate_ndistinct(PlannerInfo *root, 
RelOptInfo *rel,
        Oid                     statOid = InvalidOid;
        MVNDistinct *stats;
        StatisticExtInfo *matched_info = NULL;
-<<<<<<< HEAD
-       RangeTblEntry           *rte;
-=======
        RangeTblEntry *rte = planner_rt_fetch(rel->relid, root);
->>>>>>> REL_16_9
 
        /* bail out immediately if the table has no extended statistics */
        if (!rel->statlist)
                return false;
 
-<<<<<<< HEAD
-       /*
-        * When dealing with regular inheritance trees, ignore extended stats
-        * (which were built without data from child rels, and thus do not
-        * represent them). For partitioned tables data there's no data in the
-        * non-leaf relations, so we build stats only for the inheritance tree.
-        * So for partitioned tables we do consider extended stats.
-        */
-       rte = planner_rt_fetch(rel->relid, root);
-       if (rte->inh && rte->relkind != RELKIND_PARTITIONED_TABLE)
-               return false;
-
-=======
->>>>>>> REL_16_9
        /* look for the ndistinct statistics object matching the most vars */
        nmatches_vars = 0;                      /* we require at least two 
matches */
        nmatches_exprs = 0;
@@ -5439,11 +5415,7 @@ examine_variable(PlannerInfo *root, Node *node, int 
varRelid,
                foreach(slist, onerel->statlist)
                {
                        StatisticExtInfo *info = (StatisticExtInfo *) 
lfirst(slist);
-<<<<<<< HEAD
-                       RangeTblEntry    *rte = planner_rt_fetch(onerel->relid, 
root);
-=======
                        RangeTblEntry *rte = planner_rt_fetch(onerel->relid, 
root);
->>>>>>> REL_16_9
                        ListCell   *expr_item;
                        int                     pos;
 
@@ -5487,17 +5459,6 @@ examine_variable(PlannerInfo *root, Node *node, int 
varRelid,
                                /* found a match, see if we can extract 
pg_statistic row */
                                if (equal(node, expr))
                                {
-<<<<<<< HEAD
-                                       HeapTuple       t = 
statext_expressions_load(info->statOid, pos);
-
-                                       /* Get statistics object's table for 
permission check */
-                                       RangeTblEntry *rte;
-                                       Oid                     userid;
-
-                                       vardata->statsTuple = t;
-
-=======
->>>>>>> REL_16_9
                                        /*
                                         * XXX Not sure if we should cache the 
tuple somewhere.
                                         * Now we just create a new copy every 
time.
@@ -6173,7 +6134,6 @@ get_variable_range(PlannerInfo *root, VariableStatData 
*vardata,
        {
                bool            use_mcvs = have_data;
 
-<<<<<<< HEAD
                /*
                 * GPDB: See the identical check, above, for histogram data.
                 */
@@ -6181,8 +6141,6 @@ get_variable_range(PlannerInfo *root, VariableStatData 
*vardata,
                        elog(ERROR, "invalid MCV array of type %s, for 
attribute of type %s",
                                 format_type_be(sslot.valuetype), 
format_type_be(vardata->atttype));
 
-=======
->>>>>>> REL_16_9
                if (!have_data)
                {
                        double          sumcommon = 0.0;
diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c
index 3a59517f115..a49721ac5f2 100644
--- a/src/backend/utils/adt/tid.c
+++ b/src/backend/utils/adt/tid.c
@@ -3,13 +3,9 @@
  * tid.c
  *       Functions for the built-in type tuple id
  *
-<<<<<<< HEAD
  * Portions Copyright (c) 2006-2009, Greenplum inc
  * Portions Copyright (c) 2012-Present VMware, Inc. or its affiliates.
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-=======
  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
->>>>>>> REL_16_9
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
@@ -43,11 +39,6 @@
 #include "utils/snapmgr.h"
 #include "utils/varlena.h"
 
-<<<<<<< HEAD
-#define PG_GETARG_ITEMPOINTER(n) DatumGetItemPointer(PG_GETARG_DATUM(n))
-#define PG_RETURN_ITEMPOINTER(x) return ItemPointerGetDatum(x)
-=======
->>>>>>> REL_16_9
 
 #define LDELIM                 '('
 #define RDELIM                 ')'
diff --git a/src/backend/utils/adt/timestamp.c 
b/src/backend/utils/adt/timestamp.c
index 25c638f3ebc..b33b115b8d3 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -2769,11 +2769,7 @@ interval_cmp_value(const Interval *interval)
        return span;
 }
 
-<<<<<<< HEAD
 int
-=======
-static int
->>>>>>> REL_16_9
 interval_cmp_internal(const Interval *interval1, const Interval *interval2)
 {
        INT128          span1 = interval_cmp_value(interval1);
@@ -3509,9 +3505,6 @@ timestamp_pl_interval(PG_FUNCTION_ARGS)
        Interval   *span = PG_GETARG_INTERVAL_P(1);
        Timestamp       result;
 
-<<<<<<< HEAD
-       result = timestamp_offset_internal(timestamp, span);
-=======
        if (TIMESTAMP_NOT_FINITE(timestamp))
                result = timestamp;
        else
@@ -3594,7 +3587,6 @@ timestamp_pl_interval(PG_FUNCTION_ARGS)
 
                result = timestamp;
        }
->>>>>>> REL_16_9
 
        PG_RETURN_TIMESTAMP(result);
 }
@@ -3616,18 +3608,10 @@ timestamp_mi_interval(PG_FUNCTION_ARGS)
        PG_RETURN_TIMESTAMP(result);
 }
 
-
-<<<<<<< HEAD
-/*
- * timestamptz_pl_interval()
- * Add an interval to a timestamp with time zone data type.
- * Note that interval has provisions for qualitative year/month
-=======
 /* timestamptz_pl_interval_internal()
  * Add an interval to a timestamptz, in the given (or session) timezone.
  *
  * Note that interval has provisions for qualitative year/month and day
->>>>>>> REL_16_9
  *     units, so try to do the right thing with them.
  * To add a month, increment the month, and use the same day of month.
  * Then, if the next month has fewer days, set the day of month
@@ -3640,11 +3624,6 @@ timestamptz_pl_interval_internal(TimestampTz timestamp,
                                                                 Interval *span,
                                                                 pg_tz 
*attimezone)
 {
-<<<<<<< HEAD
-       TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
-       Interval   *span = PG_GETARG_INTERVAL_P(1);
-       TimestampTz result = timestamptz_offset_internal(timestamp, span);
-=======
        TimestampTz result;
        int                     tz;
 
@@ -3741,7 +3720,6 @@ timestamptz_pl_interval_internal(TimestampTz timestamp,
 
                result = timestamp;
        }
->>>>>>> REL_16_9
 
        return result;
 }
@@ -3780,20 +3758,8 @@ timestamptz_mi_interval(PG_FUNCTION_ARGS)
 {
        TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
        Interval   *span = PG_GETARG_INTERVAL_P(1);
-<<<<<<< HEAD
-       Interval        tspan;
-       TimestampTz result;
-
-       tspan.month = -span->month;
-       tspan.day = -span->day;
-       tspan.time = -span->time;
-
-       result = timestamptz_offset_internal(timestamp, &tspan);
-       PG_RETURN_TIMESTAMP(result);
-=======
 
        PG_RETURN_TIMESTAMP(timestamptz_mi_interval_internal(timestamp, span, 
NULL));
->>>>>>> REL_16_9
 }
 
 /* timestamptz_pl_interval_at_zone()
@@ -4485,16 +4451,10 @@ timestamp_age(PG_FUNCTION_ARGS)
        Timestamp       dt1 = PG_GETARG_TIMESTAMP(0);
        Timestamp       dt2 = PG_GETARG_TIMESTAMP(1);
        Interval   *result;
-<<<<<<< HEAD
        fsec_t          fsec,
                                fsec1 = 0,
                                fsec2 = 0;
        struct pg_tm tt,
-=======
-       fsec_t          fsec1,
-                               fsec2;
-       struct pg_itm tt,
->>>>>>> REL_16_9
                           *tm = &tt;
        struct pg_tm tt1,
                           *tm1 = &tt1;
@@ -4868,20 +4828,8 @@ timestamp_bin(PG_FUNCTION_ARGS)
                                (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
                                 errmsg("stride must be greater than zero")));
 
-<<<<<<< HEAD
        tm_diff = timestamp - origin;
        tm_delta = tm_diff - tm_diff % stride_usecs;
-=======
-       if (unlikely(pg_sub_s64_overflow(timestamp, origin, &tm_diff)))
-               ereport(ERROR,
-                               (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
-                                errmsg("interval out of range")));
-
-       /* These calculations cannot overflow */
-       tm_modulo = tm_diff % stride_usecs;
-       tm_delta = tm_diff - tm_modulo;
-       result = origin + tm_delta;
->>>>>>> REL_16_9
 
        /*
         * We want to round towards -infinity, not 0, when tm_diff is negative 
and
@@ -5073,20 +5021,8 @@ timestamptz_bin(PG_FUNCTION_ARGS)
                                (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
                                 errmsg("stride must be greater than zero")));
 
-<<<<<<< HEAD
        tm_diff = timestamp - origin;
        tm_delta = tm_diff - tm_diff % stride_usecs;
-=======
-       if (unlikely(pg_sub_s64_overflow(timestamp, origin, &tm_diff)))
-               ereport(ERROR,
-                               (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
-                                errmsg("interval out of range")));
-
-       /* These calculations cannot overflow */
-       tm_modulo = tm_diff % stride_usecs;
-       tm_delta = tm_diff - tm_modulo;
-       result = origin + tm_delta;
->>>>>>> REL_16_9
 
        /*
         * We want to round towards -infinity, not 0, when tm_diff is negative 
and
@@ -6633,19 +6569,9 @@ timestamptz_zone(PG_FUNCTION_ARGS)
        }
        else
        {
-<<<<<<< HEAD
-               /* try it as a full zone name */
-               tzp = pg_tzset(tzname);
-               if (tzp)
-               {
-                       /* Apply the timezone change */
-                       struct pg_tm tm;
-                       fsec_t          fsec = 0;
-=======
                /* full zone name, rotate from that zone */
                struct pg_tm tm;
-               fsec_t          fsec;
->>>>>>> REL_16_9
+               fsec_t          fsec = 0;
 
                if (timestamp2tm(timestamp, &tz, &tm, &fsec, NULL, tzp) != 0)
                        ereport(ERROR,
diff --git a/src/backend/utils/adt/tsvector_op.c 
b/src/backend/utils/adt/tsvector_op.c
index 26f182691a9..f511a28bb04 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -1171,15 +1171,11 @@ tsCompareString(char *a, int _lena, char *b, int _lenb, 
bool prefix)
        }
        else
        {
-<<<<<<< HEAD
 
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wstringop-overflow"
 
-               cmp = memcmp(a, b, Min(lena, lenb));
-=======
                cmp = memcmp(a, b, Min((unsigned int) lena, (unsigned int) 
lenb));
->>>>>>> REL_16_9
 
 #pragma GCC diagnostic pop
 
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index b90b362bc33..19296828da4 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -127,13 +127,8 @@ anychar_typmodout(int32 typmod)
  * of throwing an error; the caller must check SOFT_ERROR_OCCURRED()
  * to detect errors.
  */
-<<<<<<< HEAD
 BpChar *
-bpchar_input(const char *s, size_t len, int32 atttypmod)
-=======
-static BpChar *
 bpchar_input(const char *s, size_t len, int32 atttypmod, Node *escontext)
->>>>>>> REL_16_9
 {
        BpChar     *result;
        char       *r;
@@ -459,13 +454,8 @@ bpchartypmodout(PG_FUNCTION_ARGS)
  * of throwing an error; the caller must check SOFT_ERROR_OCCURRED()
  * to detect errors.
  */
-<<<<<<< HEAD
 VarChar *
-varchar_input(const char *s, size_t len, int32 atttypmod)
-=======
-static VarChar *
 varchar_input(const char *s, size_t len, int32 atttypmod, Node *escontext)
->>>>>>> REL_16_9
 {
        VarChar    *result;
        size_t          maxlen;
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 24eb7a33fd5..47b5405bc88 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -301,12 +301,8 @@ byteain(PG_FUNCTION_ARGS)
 
                bc = (len - 2) / 2 + VARHDRSZ;  /* maximum possible length */
                result = palloc(bc);
-<<<<<<< HEAD
-               bc = hex_decode(inputText + 2, len - 2, VARDATA(result));
-=======
                bc = hex_decode_safe(inputText + 2, len - 2, VARDATA(result),
                                                         escontext);
->>>>>>> REL_16_9
                SET_VARSIZE(result, bc + VARHDRSZ); /* actual length */
 
                PG_RETURN_BYTEA_P(result);


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


Reply via email to