[PATCH] Implement dynamic predicate lock ratio limits - Mailing list pgsql-hackers

From Arkady Skvorcov
Subject [PATCH] Implement dynamic predicate lock ratio limits
Date
Msg-id CAChax7xKYuS9waRheCjgA0VegZv+c6xpNvsspHSRB_ckBaCqoQ@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi hackers,

This patch series implements the TODO in predicate.c that suggests adding 
ratio-based predicate lock limits.

The series is split into two logical commits:

1. Core implementation of the GUC variables and predicate lock logic
2. Comprehensive regression tests

Patch overview:
- Adds max_predicate_locks_per_relation_ratio and max_predicate_locks_per_page_ratio GUCs
- When ratios are > 0, calculates lock limits based on relation size estimates
- Maintains full backward compatibility (default 0.0 = use existing fixed limits)
- Includes complete regression test coverage

This addresses the TODO comment in MaxPredicateChildLocks() for more
intelligent lock allocation in mixed workloads.

Looking forward to your review!

ArkadySkv

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: make -C src/test/isolation failure in index-killtuples due to btree_gist
Next
From: Bertrand Drouvot
Date:
Subject: Consistently use the XLogRecPtrIsInvalid() macro