> On 10 Dec 2024, at 08:31, Andy Fan <zhihuifan1213(at)163(dot)com> wrote:
>
> I want to know if we have some existing testing framework for
> this area (design, code, licence etc).
I think isolation tests [0] are what you are looking for. These tests are designed to test concurrent execution of various queries.
More subtle race conditions require coordination of injection points [1] or are tested with stochastic tests [2].
Best regards, Andrey Borodin.
[0] https://git.postgresql.org/cgit/postgresql.git/tree/src/test/isolation/README
[1] https://git.postgresql.org/cgit/postgresql.git/tree/src/test/modules/test_misc/t/006_signal_autovacuum.pl#n55
[2] https://git.postgresql.org/cgit/postgresql.git/tree/contrib/amcheck/t/003_cic_2pc.pl