Re: [PATCH] Microvacuum for gist.

From: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Microvacuum for gist.
Date: 2015-08-03 09:27:51
Message-ID: 55BF3417.4000609@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

30.07.2015 16:33, Alexander Korotkov пишет:
> Hi!
>
> On Thu, Jul 30, 2015 at 2:51 PM, Anastasia Lubennikova
> <lubennikovaav(at)gmail(dot)com <mailto:lubennikovaav(at)gmail(dot)com>> wrote:
>
> I have written microvacuum support for gist access method.
> Briefly microvacuum includes two steps:
> 1. When search tells us that the tuple is invisible to all
> transactions it is marked LP_DEAD and page is marked as "has dead
> tuples",
> 2. Then, when insert touches full page which has dead tuples it
> calls microvacuum instead of splitting page.
> You can find a kind of review here [1].
>
> [1]
> http://www.google-melange.com/gsoc/proposal/public/google/gsoc2015/ivanitskiy_ilya/5629499534213120
>
> Patch is in attachements. Please review it.
>
>
> Nice!
>
> Some notes about this patch.
>
> 1) Could you give same test case demonstrating that microvacuum really
> work with patch? Finally, we should get index less growing with
> microvacuum.
>
> 2) Generating notices for every dead tuple would be too noisy. I
> suggest to replace notice with one of debug levels.
>
> + elog(NOTICE, "gistkillitems. Mark Item Dead offnum %hd, blkno %d",
> offnum, BufferGetBlockNumber(buffer));
>
>
> 3) Please, recheck coding style. For instance, this line needs more
> spaces and open brace should be on the next line.
>
> + if ((scan->kill_prior_tuple)&&(so->curPageData >
> 0)&&(so->curPageData == so->nPageData)) {
>
> ------
> Alexander Korotkov
> Postgres Professional: http://www.postgrespro.com
> <http://www.postgrespro.com/>
> The Russian Postgres Company
1) Test and results are in attachments. Everything seems to work as
expected.
2) I dropped these notices. It was done only for debug purposes. Updated
patch is attached.
3) fixed
//

--
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
microvacuum_for_gist_2.patch text/plain 11.5 KB
microvacuum test.sql text/plain 1.0 KB
test_res_before.out text/plain 388 bytes
test_res_after.out text/plain 387 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2015-08-03 09:51:49 Re: [PATCH] Microvacuum for gist.
Previous Message Christoph Berg 2015-08-03 08:35:19 Re: pg_rewind tap test unstable