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
|
||||
ColumnarCheckLogicalReplication(Relation rel)
|
||||
{
|
||||
bool pubActionInsert = false;
|
||||
|
||||
if (!is_publishable_relation(rel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||
{
|
||||
PublicationDesc pubdesc;
|
||||
|
||||
RelationBuildPublicationDesc(rel, &pubdesc);
|
||||
pubActionInsert = pubdesc.pubactions.pubinsert;
|
||||
}
|
||||
#else
|
||||
if (rel->rd_pubactions == NULL)
|
||||
{
|
||||
GetRelationPublicationActions(rel);
|
||||
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),
|
||||
errmsg(
|
||||
|
|
Loading…
Reference in New Issue