@@ -388,7 +388,7 @@ static void ReleasePredXact(SERIALIZABLEXACT *sxact);
388388static SERIALIZABLEXACT * FirstPredXact (void );
389389static SERIALIZABLEXACT * NextPredXact (SERIALIZABLEXACT * sxact );
390390
391- static bool RWConflictExists (const SERIALIZABLEXACT * reader , const SERIALIZABLEXACT * writer );
391+ static bool RWConflictExists (SERIALIZABLEXACT * reader , SERIALIZABLEXACT * writer );
392392static void SetRWConflict (SERIALIZABLEXACT * reader , SERIALIZABLEXACT * writer );
393393static void SetPossibleUnsafeConflict (SERIALIZABLEXACT * roXact , SERIALIZABLEXACT * activeXact );
394394static void ReleaseRWConflict (RWConflict conflict );
@@ -404,27 +404,27 @@ static uint32 predicatelock_hash(const void *key, Size keysize);
404404static void SummarizeOldestCommittedSxact (void );
405405static Snapshot GetSafeSnapshot (Snapshot snapshot );
406406static Snapshot RegisterSerializableTransactionInt (Snapshot snapshot );
407- static bool PredicateLockExists (const PREDICATELOCKTARGETTAG * targettag );
408- static bool GetParentPredicateLockTag (const PREDICATELOCKTARGETTAG * tag ,
407+ static bool PredicateLockExists (PREDICATELOCKTARGETTAG * targettag );
408+ static bool GetParentPredicateLockTag (PREDICATELOCKTARGETTAG * tag ,
409409 PREDICATELOCKTARGETTAG * parent );
410- static bool CoarserLockCovers (const PREDICATELOCKTARGETTAG * newtargettag );
410+ static bool CoarserLockCovers (PREDICATELOCKTARGETTAG * newtargettag );
411411static void RemoveScratchTarget (bool lockheld );
412412static void RestoreScratchTarget (bool lockheld );
413413static void RemoveTargetIfNoLongerUsed (PREDICATELOCKTARGET * target ,
414414 uint32 targettaghash );
415- static void DeleteChildTargetLocks (const PREDICATELOCKTARGETTAG * newtargettag );
416- static int PredicateLockPromotionThreshold (const PREDICATELOCKTARGETTAG * tag );
417- static bool CheckAndPromotePredicateLockRequest (const PREDICATELOCKTARGETTAG * reqtag );
418- static void DecrementParentLocks (const PREDICATELOCKTARGETTAG * targettag );
419- static void CreatePredicateLock (const PREDICATELOCKTARGETTAG * targettag ,
415+ static void DeleteChildTargetLocks (PREDICATELOCKTARGETTAG * newtargettag );
416+ static int PredicateLockPromotionThreshold (PREDICATELOCKTARGETTAG * tag );
417+ static bool CheckAndPromotePredicateLockRequest (PREDICATELOCKTARGETTAG * reqtag );
418+ static void DecrementParentLocks (PREDICATELOCKTARGETTAG * targettag );
419+ static void CreatePredicateLock (PREDICATELOCKTARGETTAG * targettag ,
420420 uint32 targettaghash ,
421421 SERIALIZABLEXACT * sxact );
422422static void DeleteLockTarget (PREDICATELOCKTARGET * target , uint32 targettaghash );
423- static bool TransferPredicateLocksToNewTarget (const PREDICATELOCKTARGETTAG oldtargettag ,
424- const PREDICATELOCKTARGETTAG newtargettag ,
423+ static bool TransferPredicateLocksToNewTarget (PREDICATELOCKTARGETTAG oldtargettag ,
424+ PREDICATELOCKTARGETTAG newtargettag ,
425425 bool removeOld );
426- static void PredicateLockAcquire (const PREDICATELOCKTARGETTAG * targettag );
427- static void DropAllPredicateLocksFromTable (const Relation relation ,
426+ static void PredicateLockAcquire (PREDICATELOCKTARGETTAG * targettag );
427+ static void DropAllPredicateLocksFromTable (Relation relation ,
428428 bool transfer );
429429static void SetNewSxactGlobalXmin (void );
430430static void ClearOldPredicateLocks (void );
@@ -433,7 +433,7 @@ static void ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial,
433433static bool XidIsConcurrent (TransactionId xid );
434434static void CheckTargetForConflictsIn (PREDICATELOCKTARGETTAG * targettag );
435435static void FlagRWConflict (SERIALIZABLEXACT * reader , SERIALIZABLEXACT * writer );
436- static void OnConflict_CheckForSerializationFailure (const SERIALIZABLEXACT * reader ,
436+ static void OnConflict_CheckForSerializationFailure (SERIALIZABLEXACT * reader ,
437437 SERIALIZABLEXACT * writer );
438438
439439
@@ -601,7 +601,7 @@ NextPredXact(SERIALIZABLEXACT *sxact)
601601 * These functions manage primitive access to the RWConflict pool and lists.
602602 */
603603static bool
604- RWConflictExists (const SERIALIZABLEXACT * reader , const SERIALIZABLEXACT * writer )
604+ RWConflictExists (SERIALIZABLEXACT * reader , SERIALIZABLEXACT * writer )
605605{
606606 RWConflict conflict ;
607607
@@ -1337,7 +1337,7 @@ PredicateLockShmemSize(void)
13371337static uint32
13381338predicatelock_hash (const void * key , Size keysize )
13391339{
1340- const PREDICATELOCKTAG * predicatelocktag = (const PREDICATELOCKTAG * ) key ;
1340+ PREDICATELOCKTAG * predicatelocktag = (PREDICATELOCKTAG * ) key ;
13411341 uint32 targethash ;
13421342
13431343 Assert (keysize == sizeof (PREDICATELOCKTAG ));
@@ -1699,7 +1699,7 @@ RegisterSerializableTransactionInt(Snapshot snapshot)
16991699 * Also store it for easy reference in MySerializableXact.
17001700 */
17011701void
1702- RegisterPredicateLockingXid (const TransactionId xid )
1702+ RegisterPredicateLockingXid (TransactionId xid )
17031703{
17041704 SERIALIZABLEXIDTAG sxidtag ;
17051705 SERIALIZABLEXID * sxid ;
@@ -1748,7 +1748,7 @@ RegisterPredicateLockingXid(const TransactionId xid)
17481748 * One use is to support proper behavior during GiST index vacuum.
17491749 */
17501750bool
1751- PageIsPredicateLocked (const Relation relation , const BlockNumber blkno )
1751+ PageIsPredicateLocked (Relation relation , BlockNumber blkno )
17521752{
17531753 PREDICATELOCKTARGETTAG targettag ;
17541754 uint32 targettaghash ;
@@ -1785,7 +1785,7 @@ PageIsPredicateLocked(const Relation relation, const BlockNumber blkno)
17851785 * acceptable!
17861786 */
17871787static bool
1788- PredicateLockExists (const PREDICATELOCKTARGETTAG * targettag )
1788+ PredicateLockExists (PREDICATELOCKTARGETTAG * targettag )
17891789{
17901790 LOCALPREDICATELOCK * lock ;
17911791
@@ -1812,7 +1812,7 @@ PredicateLockExists(const PREDICATELOCKTARGETTAG *targettag)
18121812 * returns false if none exists.
18131813 */
18141814static bool
1815- GetParentPredicateLockTag (const PREDICATELOCKTARGETTAG * tag ,
1815+ GetParentPredicateLockTag (PREDICATELOCKTARGETTAG * tag ,
18161816 PREDICATELOCKTARGETTAG * parent )
18171817{
18181818 switch (GET_PREDICATELOCKTARGETTAG_TYPE (* tag ))
@@ -1851,7 +1851,7 @@ GetParentPredicateLockTag(const PREDICATELOCKTARGETTAG *tag,
18511851 * negative, but it will never return a false positive.
18521852 */
18531853static bool
1854- CoarserLockCovers (const PREDICATELOCKTARGETTAG * newtargettag )
1854+ CoarserLockCovers (PREDICATELOCKTARGETTAG * newtargettag )
18551855{
18561856 PREDICATELOCKTARGETTAG targettag ,
18571857 parenttag ;
@@ -1952,7 +1952,7 @@ RemoveTargetIfNoLongerUsed(PREDICATELOCKTARGET *target, uint32 targettaghash)
19521952 * locks.
19531953 */
19541954static void
1955- DeleteChildTargetLocks (const PREDICATELOCKTARGETTAG * newtargettag )
1955+ DeleteChildTargetLocks (PREDICATELOCKTARGETTAG * newtargettag )
19561956{
19571957 SERIALIZABLEXACT * sxact ;
19581958 PREDICATELOCK * predlock ;
@@ -2029,7 +2029,7 @@ DeleteChildTargetLocks(const PREDICATELOCKTARGETTAG *newtargettag)
20292029 * entirely arbitrarily (and without benchmarking).
20302030 */
20312031static int
2032- PredicateLockPromotionThreshold (const PREDICATELOCKTARGETTAG * tag )
2032+ PredicateLockPromotionThreshold (PREDICATELOCKTARGETTAG * tag )
20332033{
20342034 switch (GET_PREDICATELOCKTARGETTAG_TYPE (* tag ))
20352035 {
@@ -2063,7 +2063,7 @@ PredicateLockPromotionThreshold(const PREDICATELOCKTARGETTAG *tag)
20632063 * Returns true if a parent lock was acquired and false otherwise.
20642064 */
20652065static bool
2066- CheckAndPromotePredicateLockRequest (const PREDICATELOCKTARGETTAG * reqtag )
2066+ CheckAndPromotePredicateLockRequest (PREDICATELOCKTARGETTAG * reqtag )
20672067{
20682068 PREDICATELOCKTARGETTAG targettag ,
20692069 nexttag ,
@@ -2128,7 +2128,7 @@ CheckAndPromotePredicateLockRequest(const PREDICATELOCKTARGETTAG *reqtag)
21282128 * this information is no longer needed.
21292129 */
21302130static void
2131- DecrementParentLocks (const PREDICATELOCKTARGETTAG * targettag )
2131+ DecrementParentLocks (PREDICATELOCKTARGETTAG * targettag )
21322132{
21332133 PREDICATELOCKTARGETTAG parenttag ,
21342134 nexttag ;
@@ -2190,7 +2190,7 @@ DecrementParentLocks(const PREDICATELOCKTARGETTAG *targettag)
21902190 * PredicateLockAcquire for that.
21912191 */
21922192static void
2193- CreatePredicateLock (const PREDICATELOCKTARGETTAG * targettag ,
2193+ CreatePredicateLock (PREDICATELOCKTARGETTAG * targettag ,
21942194 uint32 targettaghash ,
21952195 SERIALIZABLEXACT * sxact )
21962196{
@@ -2251,7 +2251,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
22512251 * any finer-grained locks covered by the new one.
22522252 */
22532253static void
2254- PredicateLockAcquire (const PREDICATELOCKTARGETTAG * targettag )
2254+ PredicateLockAcquire (PREDICATELOCKTARGETTAG * targettag )
22552255{
22562256 uint32 targettaghash ;
22572257 bool found ;
@@ -2310,7 +2310,7 @@ PredicateLockAcquire(const PREDICATELOCKTARGETTAG *targettag)
23102310 * Clear any finer-grained predicate locks this session has on the relation.
23112311 */
23122312void
2313- PredicateLockRelation (const Relation relation , const Snapshot snapshot )
2313+ PredicateLockRelation (Relation relation , Snapshot snapshot )
23142314{
23152315 PREDICATELOCKTARGETTAG tag ;
23162316
@@ -2333,8 +2333,7 @@ PredicateLockRelation(const Relation relation, const Snapshot snapshot)
23332333 * Clear any finer-grained predicate locks this session has on the relation.
23342334 */
23352335void
2336- PredicateLockPage (const Relation relation , const BlockNumber blkno ,
2337- const Snapshot snapshot )
2336+ PredicateLockPage (Relation relation , BlockNumber blkno , Snapshot snapshot )
23382337{
23392338 PREDICATELOCKTARGETTAG tag ;
23402339
@@ -2356,8 +2355,7 @@ PredicateLockPage(const Relation relation, const BlockNumber blkno,
23562355 * Skip if this is a temporary table.
23572356 */
23582357void
2359- PredicateLockTuple (const Relation relation , const HeapTuple tuple ,
2360- const Snapshot snapshot )
2358+ PredicateLockTuple (Relation relation , HeapTuple tuple , Snapshot snapshot )
23612359{
23622360 PREDICATELOCKTARGETTAG tag ;
23632361 ItemPointer tid ;
@@ -2495,8 +2493,8 @@ DeleteLockTarget(PREDICATELOCKTARGET *target, uint32 targettaghash)
24952493 * Caller must hold SerializablePredicateLockListLock.
24962494 */
24972495static bool
2498- TransferPredicateLocksToNewTarget (const PREDICATELOCKTARGETTAG oldtargettag ,
2499- const PREDICATELOCKTARGETTAG newtargettag ,
2496+ TransferPredicateLocksToNewTarget (PREDICATELOCKTARGETTAG oldtargettag ,
2497+ PREDICATELOCKTARGETTAG newtargettag ,
25002498 bool removeOld )
25012499{
25022500 uint32 oldtargettaghash ;
@@ -2712,7 +2710,7 @@ TransferPredicateLocksToNewTarget(const PREDICATELOCKTARGETTAG oldtargettag,
27122710 * transaction which executed DROP TABLE, the false condition will be useful.
27132711 */
27142712static void
2715- DropAllPredicateLocksFromTable (const Relation relation , bool transfer )
2713+ DropAllPredicateLocksFromTable (Relation relation , bool transfer )
27162714{
27172715 HASH_SEQ_STATUS seqstat ;
27182716 PREDICATELOCKTARGET * oldtarget ;
@@ -2908,7 +2906,7 @@ DropAllPredicateLocksFromTable(const Relation relation, bool transfer)
29082906 * relation to a single relation lock on the heap.
29092907 */
29102908void
2911- TransferPredicateLocksToHeapRelation (const Relation relation )
2909+ TransferPredicateLocksToHeapRelation (Relation relation )
29122910{
29132911 DropAllPredicateLocksFromTable (relation , true);
29142912}
@@ -2929,8 +2927,8 @@ TransferPredicateLocksToHeapRelation(const Relation relation)
29292927 * which hold the locks getting in and noticing.
29302928 */
29312929void
2932- PredicateLockPageSplit (const Relation relation , const BlockNumber oldblkno ,
2933- const BlockNumber newblkno )
2930+ PredicateLockPageSplit (Relation relation , BlockNumber oldblkno ,
2931+ BlockNumber newblkno )
29342932{
29352933 PREDICATELOCKTARGETTAG oldtargettag ;
29362934 PREDICATELOCKTARGETTAG newtargettag ;
@@ -3014,8 +3012,8 @@ PredicateLockPageSplit(const Relation relation, const BlockNumber oldblkno,
30143012 * occurs in the context of another transaction isolation level.
30153013 */
30163014void
3017- PredicateLockPageCombine (const Relation relation , const BlockNumber oldblkno ,
3018- const BlockNumber newblkno )
3015+ PredicateLockPageCombine (Relation relation , BlockNumber oldblkno ,
3016+ BlockNumber newblkno )
30193017{
30203018 /*
30213019 * Page combines differ from page splits in that we ought to be able to
@@ -3086,7 +3084,7 @@ SetNewSxactGlobalXmin(void)
30863084 * holding locks.
30873085 */
30883086void
3089- ReleasePredicateLocks (const bool isCommit )
3087+ ReleasePredicateLocks (bool isCommit )
30903088{
30913089 bool needToClear ;
30923090 RWConflict conflict ,
@@ -3736,9 +3734,9 @@ XidIsConcurrent(TransactionId xid)
37363734 * currently no known reason to call this function from an index AM.
37373735 */
37383736void
3739- CheckForSerializableConflictOut (const bool visible , const Relation relation ,
3740- const HeapTuple tuple , const Buffer buffer ,
3741- const Snapshot snapshot )
3737+ CheckForSerializableConflictOut (bool visible , Relation relation ,
3738+ HeapTuple tuple , Buffer buffer ,
3739+ Snapshot snapshot )
37423740{
37433741 TransactionId xid ;
37443742 SERIALIZABLEXIDTAG sxidtag ;
@@ -4117,8 +4115,8 @@ CheckTargetForConflictsIn(PREDICATELOCKTARGETTAG *targettag)
41174115 * tuple itself.
41184116 */
41194117void
4120- CheckForSerializableConflictIn (const Relation relation , const HeapTuple tuple ,
4121- const Buffer buffer )
4118+ CheckForSerializableConflictIn (Relation relation , HeapTuple tuple ,
4119+ Buffer buffer )
41224120{
41234121 PREDICATELOCKTARGETTAG targettag ;
41244122
@@ -4202,7 +4200,7 @@ CheckForSerializableConflictIn(const Relation relation, const HeapTuple tuple,
42024200 * lead to some false positives, but it doesn't seem worth the trouble.)
42034201 */
42044202void
4205- CheckTableForSerializableConflictIn (const Relation relation )
4203+ CheckTableForSerializableConflictIn (Relation relation )
42064204{
42074205 HASH_SEQ_STATUS seqstat ;
42084206 PREDICATELOCKTARGET * target ;
@@ -4329,7 +4327,7 @@ FlagRWConflict(SERIALIZABLEXACT *reader, SERIALIZABLEXACT *writer)
43294327 *----------------------------------------------------------------------------
43304328 */
43314329static void
4332- OnConflict_CheckForSerializationFailure (const SERIALIZABLEXACT * reader ,
4330+ OnConflict_CheckForSerializationFailure (SERIALIZABLEXACT * reader ,
43334331 SERIALIZABLEXACT * writer )
43344332{
43354333 bool failure ;
0 commit comments