Re: why there is not VACUUM FULL CONCURRENTLY? - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: why there is not VACUUM FULL CONCURRENTLY?
Date
Msg-id CALdSSPj=Mcsp-xq6_CqGmgi49LZN6wZ_kL0ZNVZiV=cdFgkDRA@mail.gmail.com
Whole thread Raw
In response to Re: why there is not VACUUM FULL CONCURRENTLY?  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: why there is not VACUUM FULL CONCURRENTLY?
List pgsql-hackers
> Also, we obviously need more tests on this. Both tap-test and
> regression tests I suppose.

The one simple test to this patch can be done this way:

1) create test relation (call it vac_conc_r1 for example) and fill it
with dead tuples (insert + update or insert + delete)
2) create injection point preventing concurrent vacuum from compiling.
3) run concurrent vacuum (VACUUM FULL CONCURRENTLY) in separate thread
or in some other async way.
4) Insert new data in relation to vac_conc_r1.
5) Release injection point, assert that vacuum completed successfully.
6) check that all data is present in vac_conc_r1 (data from step 1 and
from step 4).

This way we can catch some basic buggs, if some paths of VACUUM
CONCURRENTLY will be touched in the future.
The problem with this test is: i don't know how to do anything async
in current TAP tests (needed in step 3). Also, maybe test with async
interaction
may be too flappy (producing false negative flaps) to support.
Sequential test for this feature would be much better, but I can't
think of one.

Also, should we create a cf entry for this thread already?



pgsql-hackers by date:

Previous
From: Ertan Küçükoglu
Date:
Subject: Re: Windows default locale vs initdb
Next
From: Laurenz Albe
Date:
Subject: Re: proposal: schema variables