mirror of https://github.com/citusdata/citus.git
PG15: Handle different ways to get publication actions.
Account for PG commit 52e4f0cd47.pull/5920/head
parent
1c1ef7ab8d
commit
9915fe8a1a
|
@ -2292,18 +2292,30 @@ detoast_values(TupleDesc tupleDesc, Datum *orig_values, bool *isnull)
|
||||||
static void
|
static void
|
||||||
ColumnarCheckLogicalReplication(Relation rel)
|
ColumnarCheckLogicalReplication(Relation rel)
|
||||||
{
|
{
|
||||||
|
bool pubActionInsert = false;
|
||||||
|
|
||||||
if (!is_publishable_relation(rel))
|
if (!is_publishable_relation(rel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||||
|
{
|
||||||
|
PublicationDesc pubdesc;
|
||||||
|
|
||||||
|
RelationBuildPublicationDesc(rel, &pubdesc);
|
||||||
|
pubActionInsert = pubdesc.pubactions.pubinsert;
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (rel->rd_pubactions == NULL)
|
if (rel->rd_pubactions == NULL)
|
||||||
{
|
{
|
||||||
GetRelationPublicationActions(rel);
|
GetRelationPublicationActions(rel);
|
||||||
Assert(rel->rd_pubactions != NULL);
|
Assert(rel->rd_pubactions != NULL);
|
||||||
}
|
}
|
||||||
|
pubActionInsert = rel->rd_pubactions->pubinsert;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (rel->rd_pubactions->pubinsert)
|
if (pubActionInsert)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||||
errmsg(
|
errmsg(
|
||||||
|
|
Loading…
Reference in New Issue