Re: Re: A separate table level option to control compression

2019-04-07 Thread Michael Paquier
On Sat, Apr 06, 2019 at 09:18:18PM -0400, Andrew Dunstan wrote: > Yeah, I'd hoped for some more opinions. I agree we've run out of time :-( We are a couple of hours away from the freeze, so I have marked the patch as returned with feedback. Let's see if we can still do something for the other ite

Re: Re: A separate table level option to control compression

2019-04-06 Thread Andrew Dunstan
On Sat, Apr 6, 2019 at 3:18 AM Michael Paquier wrote: > > On Fri, Apr 05, 2019 at 09:10:31AM -0400, Andrew Dunstan wrote: > > Well, that would be a bit sad. ISTM if we conclude that the current > > behaviour is a bug we could commit the current patch and backpatch a > > fix to honor a lower toast_

Re: Re: A separate table level option to control compression

2019-04-06 Thread Michael Paquier
On Fri, Apr 05, 2019 at 09:10:31AM -0400, Andrew Dunstan wrote: > Well, that would be a bit sad. ISTM if we conclude that the current > behaviour is a bug we could commit the current patch and backpatch a > fix to honor a lower toast_tuple_threshold. But yes, time is tight. 48 hours remain, which

Re: Re: A separate table level option to control compression

2019-04-05 Thread Andrew Dunstan
On Fri, Apr 5, 2019 at 2:58 AM Michael Paquier wrote: > > On Wed, Apr 03, 2019 at 03:23:33PM +0900, Michael Paquier wrote: > > It seems to me that c251336 should have done all those things from the > > start... In other terms, isn't that a bug and something that we > > should fix and back-patch?

Re: Re: A separate table level option to control compression

2019-04-04 Thread Michael Paquier
On Wed, Apr 03, 2019 at 03:23:33PM +0900, Michael Paquier wrote: > It seems to me that c251336 should have done all those things from the > start... In other terms, isn't that a bug and something that we > should fix and back-patch? I'll begin a new thread about that to > catch more attention, w

Re: Re: A separate table level option to control compression

2019-04-02 Thread Michael Paquier
On Wed, Apr 03, 2019 at 11:40:57AM +0530, Pavan Deolasee wrote: > On Wed, Apr 3, 2019 at 10:19 AM Michael Paquier wrote: >> - The comments in tuptoaster.h need to be updated to outline the >> difference between the compression invocation and the toast invocation >> thresholds. The wording could b

Re: Re: A separate table level option to control compression

2019-04-02 Thread Pavan Deolasee
On Wed, Apr 3, 2019 at 10:19 AM Michael Paquier wrote: > > > I have been looking at this patch more, and here are some notes: > - The tests can be really simplified using directly reltoastrelid, so > I changed the queries this way. I am aware that the surroundings > hardcode directly the relatio

Re: Re: A separate table level option to control compression

2019-04-02 Thread Michael Paquier
On Tue, Apr 02, 2019 at 02:35:19PM +0900, Michael Paquier wrote: > + compress_tuple_threshold = RelationGetCompressTupleTarget(relation, > + toast_tuple_threshold); > + compress_tuple_threshold = Min(compress_tuple_threshold, > + to

Re: Re: A separate table level option to control compression

2019-04-01 Thread Michael Paquier
On Tue, Apr 02, 2019 at 11:37:56AM +0900, Masahiko Sawada wrote: > Marked. + compress_tuple_threshold = RelationGetCompressTupleTarget(relation, + toast_tuple_threshold); + compress_tuple_threshold = Min(compress_tuple_threshold, +

Re: Re: A separate table level option to control compression

2019-04-01 Thread Masahiko Sawada
On Wed, Mar 27, 2019 at 3:38 PM Masahiko Sawada wrote: > > On Thu, Mar 21, 2019 at 10:40 PM Pavan Deolasee > wrote: > > > > Hi, > > > > On Thu, Mar 21, 2019 at 3:10 AM Shaun Thomas > > wrote: > >> > >> > >> I can't really speak for the discussion related to `storage.sgml`, but > >> I based my i

Re: Re: A separate table level option to control compression

2019-03-27 Thread Shaun Thomas
> Setting compress_tuple_target to a higher value won't be negative because the > toast_tuple_target is used for compression anyways when compress_tuple_target > is higher than toast_tuple_target. Ack, you're right. Got my wires crossed. I must have gotten confused by my later tests that enforced

Re: Re: A separate table level option to control compression

2019-03-26 Thread Masahiko Sawada
On Thu, Mar 21, 2019 at 10:40 PM Pavan Deolasee wrote: > > Hi, > > On Thu, Mar 21, 2019 at 3:10 AM Shaun Thomas > wrote: >> >> >> I can't really speak for the discussion related to `storage.sgml`, but >> I based my investigation on the existing patch to `create_table.sgml`. >> About the only thi

Re: Re: A separate table level option to control compression

2019-03-21 Thread Pavan Deolasee
Hi, On Thu, Mar 21, 2019 at 3:10 AM Shaun Thomas wrote: > > I can't really speak for the discussion related to `storage.sgml`, but > I based my investigation on the existing patch to `create_table.sgml`. > About the only thing I would suggest there is to possibly tweak the > wording. > > * "The

Re: Re: A separate table level option to control compression

2019-03-20 Thread Shaun Thomas
Jumping in here, please be gentle. :) Contents & Purpose == This appears to be a patch to add a new table storage option similar to `toast_tuple_target` but geared toward compression. As a result, it's been named `compress_tuple_target`, and allows modifying the threshold where in

Re: Re: A separate table level option to control compression

2019-03-20 Thread David Steele
Hi Pavan, On 3/12/19 4:38 PM, Andrew Dunstan wrote: On 3/11/19 2:23 AM, Masahiko Sawada wrote: I like this idea. The patch seems to need update the part describing on-disk toast storage in storage.sgml. Yeah. Meanwhile, here's a rebased version of the patch to keep the cfbot happy. Looks

Re: A separate table level option to control compression

2019-03-12 Thread Andrew Dunstan
On 3/11/19 2:23 AM, Masahiko Sawada wrote: > On Wed, Feb 6, 2019 at 4:32 PM Pavan Deolasee > wrote: >> Hello, >> >> Currently either the table level option `toast_tuple_target` or the compile >> time default `TOAST_TUPLE_TARGET` is used to decide whether a new tuple >> should be compressed or

Re: A separate table level option to control compression

2019-03-10 Thread Masahiko Sawada
On Wed, Feb 6, 2019 at 4:32 PM Pavan Deolasee wrote: > > Hello, > > Currently either the table level option `toast_tuple_target` or the compile > time default `TOAST_TUPLE_TARGET` is used to decide whether a new tuple > should be compressed or not. While this works reasonably well for most > si

Re: A separate table level option to control compression

2019-03-06 Thread Robert Haas
On Tue, Mar 5, 2019 at 5:30 PM Andrew Dunstan wrote: > This is a nice idea, and I'm a bit surprised it hasn't got more > attention. The patch itself seems very simple and straightforward, > although it could probably do with having several sets of eyeballs on it. I haven't needed this for anythin

Re: A separate table level option to control compression

2019-03-05 Thread Andrew Dunstan
On 2/6/19 2:32 AM, Pavan Deolasee wrote: > Hello, > > Currently either the table level option `toast_tuple_target` or the > compile time default `TOAST_TUPLE_TARGET` is used to decide whether a > new tuple should be compressed or not. While this works reasonably > well for most situations, at tim

A separate table level option to control compression

2019-02-05 Thread Pavan Deolasee
Hello, Currently either the table level option `toast_tuple_target` or the compile time default `TOAST_TUPLE_TARGET` is used to decide whether a new tuple should be compressed or not. While this works reasonably well for most situations, at times the user may not want to pay the overhead of toasti