mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
Simplify IsIndexUsableForReplicaIdentityFull()
Take Relation as argument instead of IndexInfo. Building the IndexInfo is an unnecessary intermediate step here. A future patch wants to get some information that is in the relcache but not in IndexInfo, so this will also help there. Discussion: https://www.postgresql.org/message-id/333d3886-b737-45c3-93f4-594c96bb405d@eisentraut.org
This commit is contained in:
@@ -2931,7 +2931,7 @@ FindReplTupleInLocalRel(ApplyExecutionData *edata, Relation localrel,
|
||||
/* Index must be PK, RI, or usable for REPLICA IDENTITY FULL tables */
|
||||
Assert(GetRelationIdentityOrPK(localrel) == localidxoid ||
|
||||
(remoterel->replident == REPLICA_IDENTITY_FULL &&
|
||||
IsIndexUsableForReplicaIdentityFull(BuildIndexInfo(idxrel),
|
||||
IsIndexUsableForReplicaIdentityFull(idxrel,
|
||||
edata->targetRel->attrmap)));
|
||||
index_close(idxrel, AccessShareLock);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user