As for patch itself, I don’t like the idea to store rowid for ephemeral space
in cursor: if insertion in such space occurred not via SQL facilities, then
rowid would be wrong…Well, we know that rowid is always in
the last field, so why just don’t fetch value from last field and increment it?
Rowid cannot be stored in the last field, because tuples are sorted by the first parts.
Wait, where is rowid stored now? AFAIU it is still placed in the last field.
That means that means that greatest tuple may not has the greatest rowid.
Now I am thinking about introducing secondary index for table with rowid on the last field.
Could you take a look at code and say whether this idea feasible or not?
In this case, it would be easy to fetch max value from ‘last’ field and increment it.
Anyway even if this idea fails as well, lets come up with better solution.
PS add patches mailing list to receivers so that our conversation is available for everyone.