Re: Faster inserts with mostly-monotonically increasing values
| От | Claudio Freire | 
|---|---|
| Тема | Re: Faster inserts with mostly-monotonically increasing values | 
| Дата | |
| Msg-id | CAGTBQpbJxLRn4zJpFSQgWBSU=j_01yWDHmZv1EGSfV7=fXqhNw@mail.gmail.com обсуждение исходный текст | 
| Ответ на | Re: Faster inserts with mostly-monotonically increasing values (Heikki Linnakangas <hlinnaka@iki.fi>) | 
| Ответы | Re: Faster inserts with mostly-monotonically increasing values | 
| Список | pgsql-hackers | 
On Tue, Apr 10, 2018 at 11:10 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>>                 /* XLOG stuff */
>>                 if (RelationNeedsWAL(rel))
>>                 {
>>                         ...
>>
>>                         if (P_ISLEAF(lpageop))
>>                         {
>>                                 xlinfo = XLOG_BTREE_INSERT_LEAF;
>>
>>                                 /*
>>                                  * Cache the block information if we just
>> inserted into the
>>                                  * rightmost leaf page of the index.
>>                                  */
>>                                 if (P_RIGHTMOST(lpageop))
>>                                         RelationSetTargetBlock(rel,
>> BufferGetBlockNumber(buf));
>>                         }
>>                         ...
>
>
>
> Why is this RelationSetTargetBlock() call inside the "XLOG stuff" block?
> ISTM that we're failing to take advantage of this optimization for unlogged
> tables, for no particular reason. Just an oversight?
>
> - Heikki
Indeed.
Maybe Pavan knows of one, but I don't see any reason not to apply this
to unlogged tables as well. It slipped the review.
		
	В списке pgsql-hackers по дате отправления: