>> Since I've mentioned my use case, I might as well mention another issue I stumbled across, which is that concurrent
indexcreation cannot happen from within trigger functions. I'm able to non-concurrently create indexes from within
triggerfunctions. 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
couldrecord just the "actuation" of the index creation in the trigger's transaction, and postgresql would actually
populatethe index once the trigger's transaction is committed.
--David