>> Since I've mentioned my use case, I might as well mention another issue I 
>> stumbled across, which is that concurrent index creation cannot happen from 
>> within trigger functions. I'm able to non-concurrently create indexes from 
>> within trigger functions. Why is there this disparity?
> 
> Because concurrent index creation needs to open and commit transactions
> underneath, which regular index creation does not.  Functions cannot run
> across transaction boundaries.

Would having background index creation allow for this? For example, launching a 
background concurrent index creation could record just the "actuation" of the 
index creation in the trigger's transaction, and postgresql would actually 
populate the index once the trigger's transaction is committed.

--David

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to