Skip to content

Commit

Permalink
Fix cherry-pick issues
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke committed Jan 15, 2025
1 parent 0a0f7f6 commit 1cbd57e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/backend/access/common/reloptions_gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,9 @@ reloption_is_default(const char *optstr, int optlen)
else
res = false;

pfree(defaultopt);
if (defaultopt)
pfree(defaultopt);

return res;
}

Expand Down
2 changes: 1 addition & 1 deletion src/backend/commands/tablecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -16176,7 +16176,7 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation,
if ((RelationIsAppendOptimized(rel) && !am_change_heap_ao) ||
(!RelationIsAppendOptimized(rel) && am_change_heap_ao))
{
StdRdOptions *stdRdOptions = (StdRdOptions *) table_reloptions(rel->rd_tableam->amoptions, newOptions, rel->rd_rel->relkind, true);
StdRdOptions *stdRdOptions = (StdRdOptions *) default_reloptions(newOptions, true, RELOPT_KIND_APPENDOPTIMIZED);
validateAppendOnlyRelOptions(stdRdOptions->blocksize,
gp_safefswritesize,
stdRdOptions->compresslevel,
Expand Down
2 changes: 1 addition & 1 deletion src/backend/commands/trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ EnableDisableTriggerNew(Relation rel, const char *tgname,
rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE &&
(TRIGGER_FOR_ROW(oldtrig->tgtype)))
{
PartitionDesc partdesc = RelationGetPartitionDesc(rel);
PartitionDesc partdesc = RelationGetPartitionDesc(rel, false);
int i;

for (i = 0; i < partdesc->nparts; i++)
Expand Down
4 changes: 0 additions & 4 deletions src/include/commands/tablecmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@

struct AlterTableUtilityContext; /* avoid including tcop/utility.h here */

/* Convenient macro for checking AO AMs */
#define IsAccessMethodAO(am_oid) \
(am_oid == AO_ROW_TABLE_AM_OID || am_oid == AO_COLUMN_TABLE_AM_OID)

extern const char *synthetic_sql;

extern void DefineExternalRelation(CreateExternalStmt *stmt);
Expand Down

0 comments on commit 1cbd57e

Please sign in to comment.