Re: checking for interrupts during heap insertion - Mailing list pgsql-hackers

From Robert Haas
Subject Re: checking for interrupts during heap insertion
Date
Msg-id CA+TgmoaB_HRepjBRqHJRaaq6e6HLDpBjbFLVJzWyz4SUeb2Gpg@mail.gmail.com
Whole thread Raw
In response to Re: checking for interrupts during heap insertion  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On Mon, Jun 23, 2014 at 3:30 PM, Heikki Linnakangas
<hlinnakangas@vmware.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns
Next
From: Michael Paquier
Date:
Subject: Re: [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns