Re: checking for interrupts during heap insertion

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: checking for interrupts during heap insertion
Date: 2014-06-24 02:04:51
Message-ID: CA+TgmoaB_HRepjBRqHJRaaq6e6HLDpBjbFLVJzWyz4SUeb2Gpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 23, 2014 at 3:30 PM, Heikki Linnakangas
<hlinnakangas(at)vmware(dot)com> wrote:
>> load, then it might take quite a long time. I'm thinking we might
>> want a CHECK_FOR_INTERRUPTS() in the following two places:
>>
>> 1. Inside toast_save_datum, at the top of the loop that starts with
>> "while (data_todo > 0)".
>> 2. Inside heap_multi_insert, at the top of the loop that starts with
>> "while (ndone < ntuples)".
>
> Seems reasonable.

OK, done.

I don't have time to pursue this at the moment, but while looking at
this, I was also wondering if toast_save_datum() ought to be rewritten
to use heap_multi_insert(). I seem to recall that you found that the
multi-insert optimization mostly benefited narrow tables, so I'm not
sure whether it would work out to a win, but maybe it'd be worth
investigating.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-06-24 02:08:18 Re: [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns
Previous Message Tom Lane 2014-06-24 01:43:31 Re: [HACKERS] BUG #10728: json_to_recordset with nested json objects NULLs columns