Re: Compressed TOAST Slicing
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul Ramsey <pramsey@cleverelephant.ca>
Cc: Simon Riggs <simon@2ndquadrant.com>, Andres Freund <andres@anarazel.de>,
rafia.sabih@enterprisedb.com, Stephen Frost <sfrost@snowman.net>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-02-20T19:50:25Z
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
Paul Ramsey <pramsey@cleverelephant.ca> writes: >> On Feb 20, 2019, at 10:37 AM, Simon Riggs <simon@2ndquadrant.com> wrote: >> If we add one set of code now and need to add another different one later, we will have 2 sets of code that do similar things. > Note that adding an iterator isn’t adding two ways to do the same thing, > since the iterator would slot nicely underneath the existing slicing > API, and just iterate to the requested slice size. So this is easily > just “another step” along the train line to providing streaming access > to compressed and TOASTed data. Yeah, I find Paul's argument fairly convincing there. There wouldn't be much code duplication, and for the places that can use it, a "fetch the first N bytes" API is probably going to be more natural and easier to use than an iteration-based API. So we'd likely want to keep it, even if it ultimately becomes just a thin wrapper over the iterator. I've not reviewed the patch, but as far as the proposed functionality goes, it seems fine to accept this rather than waiting for something much more difficult to happen. regards, tom lane