Hello! > I'm not really sure that we want need to have a setting for how > frequently to reset the snapshot. For testing I agree that it's okay to > make it very frequent, but otherwise I think we'd rather the user not > have to be concerned with a setting for this. Just make it happen on a > regular enough basis, so that the user can forget it.
Yes, it is for internal testing (especially the mode with a reset each time). It is in group 'DEVELOPER_OPTIONS'. > 100ms sounds a bit too frequent for my taste. But why do we need to > measure it in wall-clock time? In the REPACK proposed patches, Antonin > does it every 1024 pages (the value to be tuned, per the XXX comment in > the patch). I think a page-measured operation is good enough, and maybe > something like once every 128 MB (so every 16k pages?) It was initially per-page, but adjusted after Mathias review [0] : > Some pages may take much longer to process than others (e.g. TOAST > pages are not accounted for, a huge gin pending list, ...), so I think > a timer will make more sense. I think the time-based option is a bit more understandable (I have no idea how many pages it should be to cause a reset each 1 min, for example). > See > https://postgr.es/m/[email protected] > wherein I proposed to add a PG_TEST_EXTRA variable that would be > something like > stress_concurrently=1 > which runs the test for a short time (I used 6 seconds), or > stress_concurrently=0 to disable the test completely, or larger positive > integers to scale the test up in duration and number of tuples. In previous version it search for `stress` in PG_TEST_EXTRA and adjust variables. But yes, stress_concurrently=X feels better solution - I'll redo it that way on next iteration. Best regards, Mikhail. [0]: https://www.postgresql.org/message-id/CAEze2WhwwAB_DVAWfunO%3D_1QZu-J%2BThbpVbvdoOyycswQETFfw%40mail.gmail.com
