Re: isolation tester limitation in case of multiple injection points in a single command
| От | Michael Paquier |
|---|---|
| Тема | Re: isolation tester limitation in case of multiple injection points in a single command |
| Дата | |
| Msg-id | aPWHbcSoaxWCTXox@paquier.xyz обсуждение исходный текст |
| Ответ на | isolation tester limitation in case of multiple injection points in a single command (Mihail Nikalayeu <mihailnikalayeu@gmail.com>) |
| Ответы |
Re: isolation tester limitation in case of multiple injection points in a single command
|
| Список | pgsql-hackers |
On Sun, Oct 19, 2025 at 03:41:00PM +0200, Mihail Nikalayeu wrote: > Hello, everyone! > > While stabilizing tests for [0] I realized I have no idea how to set > up a pretty simple scenario using an isolation tester. > > It looks like this: > * session S1 start long running query (CREATE INDEX CONCURRENTLY) and > traps into injection point X > * session S2 executes some command > * session S2 wakes up S1 > * now S2 needs to run one more command BUT only AFTER S1 traps into > another injection point Y (and it is still the same CREATE INDEX) > <------- tricky part here Ah, OK. So you want to have one single command, still wait through two injection points inside it. I am wondering about one thing: do you really require that? Could it be simpler to have two permutations, each one of them using one wait point to check your two scenarios? > So, my proposal options: > a) tell me if there's a clear solution I missed > b) for 'wait' injection_point - learn isolation tester to detect it > and implement logic like 'S2_query(S1 traps Y)' > c) learn isolation tester to treat 'notice' from injection_point the > same way as RAISE NOTICE + (preferable) add possibility to > apply 'notice' and 'wait' for the same injection point (like > 'wait+notice') > d) add injection_point_await - utility to wait until injected point is not > "waited" by some backend > > What do you think? Any other ideas? Something close to what you are suggested in b), that can be defined in the specs, sounds like a natural solution to me. It also feels like a better approach from the spec's reader perspective, as well: this would document multiple wait steps in the test itself. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: