mirror of
https://github.com/postgres/postgres.git
synced 2026-06-08 16:26:30 -04:00
Check for interrupts during non-fast-update GIN insertion
ginExtractEntries() can produce a lot of entries for a single item. During index build, we check for interrupts between entries, and the fast-update codepath does it as part of vacuum_delay_point(), but the non-fast update insertion codepath was uninterruptible. Add CHECK_FOR_INTERRUPTS() between entries in the non-fast update codepath too. Author: Vinod Sridharan <vsridh90@gmail.com> Discussion: https://www.postgresql.org/message-id/CAFMdLD6mQvAuStiOGvBJxAEfo6wdjZhj3+JveTLxOX8MVn4zmA@mail.gmail.com
This commit is contained in:
parent
fa6f2f624c
commit
2e1dcf8c54
1 changed files with 4 additions and 0 deletions
|
|
@ -850,8 +850,12 @@ ginHeapTupleInsert(GinState *ginstate, OffsetNumber attnum,
|
|||
&nentries, &categories);
|
||||
|
||||
for (i = 0; i < nentries; i++)
|
||||
{
|
||||
/* there could be many entries, so be willing to abort here */
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
ginEntryInsert(ginstate, attnum, entries[i], categories[i],
|
||||
item, 1, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Reference in a new issue