Re: Compressed TOAST Slicing
Юрий Соколов <funny.falcon@gmail.com>
From: Юрий Соколов <funny.falcon@gmail.com>
To: Paul Ramsey <pramsey@cleverelephant.ca>
Cc: Simon Riggs <simon@2ndquadrant.com>, rafia.sabih@enterprisedb.com, Tom Lane <tgl@sss.pgh.pa.us>, Stephen Frost <sfrost@snowman.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-02-20T03:30:31Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add support for partial TOAST decompression
- 4d0e994eed83 12.0 landed
-
Remove remaining hard-wired OID references in the initial catalog data.
- 3aa0395d4ed3 12.0 cited
-
Rephrase references to "time qualification".
- ebcc7bf949ba 12.0 cited
Some time ago I posted PoC patch with alternative TOAST compression scheme: instead of "compress-then-chunk" I suggested "chunk-then-compress". It decrease compression level, but allows efficient arbitrary slicing. ср, 20 февр. 2019 г., 2:09 Paul Ramsey pramsey@cleverelephant.ca: > On Sat, Feb 16, 2019 at 7:25 AM Simon Riggs <simon@2ndquadrant.com> wrote: > > > Could we get an similarly optimized implementation of -> operator for > JSONB as well? > > Are there any other potential uses? Best to fix em all up at once and > then move on to other things. Thanks. > > Oddly enough, I couldn't find many/any things that were sensitive to > left-end decompression. The only exception is "LIKE this%" which > clearly would be helped, but unfortunately wouldn't be a quick > drop-in, but a rather major reorganization of the regex handling. > > I had a look at "->" and I couldn't see how a slice could be used to > make it faster? We don't a priori know how big a slice would give us > what we want. This again makes Stephen's case for an iterator, but of > course all the iterator benefits only come when the actual function at > the top (in this case the json parser) are also updated to be > iterative. > > Committing this little change doesn't preclude an iterator, or even > make doing one more complicated... :) > > P. > >