Add a check for interrupts in ginInsert - Mailing list pgsql-hackers

From Vinod Sridharan
Subject Add a check for interrupts in ginInsert
Date
Msg-id CAFMdLD6mQvAuStiOGvBJxAEfo6wdjZhj3+JveTLxOX8MVn4zmA@mail.gmail.com
Whole thread
Responses Re: Add a check for interrupts in ginInsert
List pgsql-hackers
Hello,
Please find attached a small patch that adds the ability to check for
interrupts during the insert into the GIN index. Currently, ginInsert
can generate a large number of entries for a given input tuple from
extractEntries. In the case of Json/Jsonb for instance, the standard
opclasses may generate 1 term per path & value (which may be large).
During index build, the build process does check for interrupts in
between the inserts of each entry into the index (since there may be a
large number of entries to insert). However, the same loop during
insert was not checking for interrupts. This patch adds an interrupt
check to allow for early termination if the overall request is
abandoned. I believe this should be a safe point for checking for
interrupts since we should not be in the middle of modifying the index
tree in between entries.

Thanks and Regards,
Vinod Sridharan
[Microsoft]

Attachment

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Add starelid, attnum to pg_stats and leverage this in pg_dump
Next
From: Laurenz Albe
Date:
Subject: Re: Change initdb default to the builtin collation provider