On 2022-Jul-30, Tom Lane wrote: > BTW, quite aside from stability, is it really necessary for this test to > be so freakin' slow? florican for instance reports > > [12:54:07] t/033_replay_tsp_drops.pl ............ ok 117840 ms ( 0.01 usr > 0.00 sys + 8.72 cusr 5.41 csys = 14.14 CPU) > > 027 is so bloated because it runs the core regression tests YA time, > which I'm not very happy about either; but that's no excuse for > every new test to contribute an additional couple of minutes.
Definitely not intended. It looks like the reason is just that the DROP DATABASE/TABLESPACE commands are super slow, and this test does a lot of that. I added some instrumentation and the largest fraction of time goes to execute this CREATE DATABASE dropme_db1 WITH TABLESPACE dropme_ts1; CREATE TABLE t (a int) TABLESPACE dropme_ts2; CREATE DATABASE dropme_db2 WITH TABLESPACE dropme_ts2; CREATE DATABASE moveme_db TABLESPACE source_ts; ALTER DATABASE moveme_db SET TABLESPACE target_ts; CREATE DATABASE newdb TEMPLATE template_db; ALTER DATABASE template_db IS_TEMPLATE = false; DROP DATABASE dropme_db1; DROP TABLE t; DROP DATABASE dropme_db2; DROP TABLESPACE dropme_ts2; DROP TABLESPACE source_ts; DROP DATABASE template_db; Maybe this is overkill and we can reduce the test without damaging the coverage. I'll have a look during the weekend. I'll repair the reliability problem too, separately. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "This is a foot just waiting to be shot" (Andrew Dunstan)