Basically i loaded the xml to table u 100 times. Load script attached.
Peter, while reviewing the better performing patch myself, now i think the patch needs more work to be committed. The structuring of the method will be confusing in the long term. I think i'll restructure the patch in the next commitfest.
So i propose to break the patch:
1. We apply the current patch which uses xmlNodeCopy, so that the long-standing bug will be fixed in postgres.
2. I'll work with the performance enhancement in the next commitfest.
Maybe for (2), the current better-performing patch can be viewed as PoC of the expected performance.