[postgis-tickets] [PostGIS] #4657: Avoid De-TOASTing where Possible

PostGIS trac at osgeo.org
Tue Apr 7 13:14:11 PDT 2020


#4657: Avoid De-TOASTing where Possible
-------------------------+---------------------------
 Reporter:  pramsey      |      Owner:  pramsey
     Type:  enhancement  |     Status:  assigned
 Priority:  medium       |  Milestone:  PostGIS 3.1.0
Component:  postgis      |    Version:  master
 Keywords:               |
-------------------------+---------------------------
 In answer to a query about using Datum as a key in a cache to avoid de-
 TOASTING overhead, Tom Lane said:

 https://www.postgresql.org/message-id/8196.1585870220@sss.pgh.pa.us


    The case where this would actually be worth doing, probably, is where
 you are receiving a toasted-out-of-line datum.  In that case you could
 legitimately use the toast pointer ID values (va_valueid + va_toastrelid)
 as a lookup key for a cache, as long as it had a lifespan of a statement
 or less.

 This actually turns out to be a small extra patch that just sits at the
 detoast step at the top of functions that use caching machinery.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4657>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list