>>>>> "Peter" == Peter Geoghegan <p...@heroku.com> writes:

 Peter> Okay, then. I concede the point: We should support the datum
 Peter> case as you outline, since it is simpler than any
 Peter> alternative. It probably won't even be necessary to formalize
 Peter> the idea that finished abbreviated keys must be pass-by-value
 Peter> (at least not for the benefit of this functionality); if someone
 Peter> writes an opclass that generates pass-by-reference abbreviated
 Peter> keys (I think that might actually make sense, although I'm being
 Peter> imaginative), it simply won't work for the datum sort case,
 Peter> which is probably fine.

I don't see why a by-reference abbreviated key would be any more of an
issue for the datum sorter than for anything else. In either case you'd
just get excess memory usage (any memory allocated by the abbreviation
function for the result won't be charged against work_mem and won't be
freed until the sort ends).

What matters for the datum sorter (and not for the others) is that we
not try and abbreviate a by-value type (since we only have an allocated
copy of the value if it was by-reference); this is handled in the code
by just not asking for abbreviation in such cases.

 Peter> Are you going to submit this to the final commitfest? I'll
 Peter> review it if you do.

I'll post a cleaned-up version after the existing issues are fixed.

-- 
Andrew (irc:RhodiumToad)


-- 
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