Re: [PATCH] Microvacuum for gist.

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Microvacuum for gist.
Date: 2015-09-17 16:14:13
Message-ID: CAMkU=1zpZ+dwPpgwqZwM5fJsZGOg-yNi1YwdoPw6XioXYiOzyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 16, 2015 at 8:36 AM, Teodor Sigaev <teodor(at)sigaev(dot)ru> wrote:

> But It seems to me that it would be better to rewrite all mentions of
>> TupleDelete to MultiDelete in gist code.
>>
>
> Sure. Patch is attached, and it changes WAL format, so be carefull with
> testing.
> Please, have a look.
>
> Also in attach scripts reproduce bug from Jeff's report:
> g.pl - creates and fills test table
> w.pl - worker, could run in several session
>
> Usage
> perl g.pl | psql contrib_regression
> perl w.pl | psql contrib_regression | grep 'UPDATE 0'
>
> and killall -9 postgres while w.pl is running. Recovery will fail with
> high probability.
>
> Thank you, Jeff, for report.

Thanks, that seems to have fixed it.

But I don't understand this comment:

+ /*
+ * While we delete only one tuple at once we could mix calls
+ * PageIndexTupleDelete() here and PageIndexMultiDelete() in
+ * gistRedoPageUpdateRecord()
+ */

Does this mean:

Since we delete only one tuple per WAL record here, we can call
PageIndexTupleDelete() here and re-play it with PageIndexMultiDelete() in
gistRedoPageUpdateRecord()

Thanks,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2015-09-17 16:44:36 Re: [PATCH] Microvacuum for gist.
Previous Message Andrew Dunstan 2015-09-17 15:55:59 Re: honour TEMP_CONFIG in pg_upgrade tests