Re: Make autovacuum sort tables in descending order of xid_age

2020-01-08 Thread David Kimura
On Tue, Jan 7, 2020 at 12:47 PM David Fetter wrote: > Per a suggestion Christophe made, please find attached a patch to > $Subject: Curious, what's the benefit of autovacuum handling the oldest tables first? If there is a related thread with the discussion, I couldn't find it. > Apart from caref

Re: Make autovacuum sort tables in descending order of xid_age

2020-01-10 Thread David Kimura
On Thu, Jan 9, 2020 at 12:07 PM Robert Haas wrote: > > On Thu, Dec 12, 2019 at 2:26 PM David Fetter wrote: > > > I wonder if you might add information about table size, table changes, > > > and bloat to your RelFrozenXidAge struct and modify rfxa_comparator to > > > use a heuristic to cost the (a

Unexpected (wrong?) result querying boolean partitioned table with NULL partition

2023-04-12 Thread David Kimura
Hi Hackers, Is it fair to assume that, given the same data, a partitioned table should return the same results as a non-partitioned table? If that's true, then I think I may have stumbled across a case of wrong results on boolean partitioned tables. In following example, I think we incorrectly s

Re: Unexpected (wrong?) result querying boolean partitioned table with NULL partition

2023-04-13 Thread David Kimura
On Wed, Apr 12, 2023 at 4:13 AM David Rowley wrote: > On Wed, 12 Apr 2023 at 22:13, David Kimura wrote: > > Is it fair to assume that, given the same data, a partitioned table should > > return the same results as a non-partitioned table? > > Yes, and

Re: Unexpected (wrong?) result querying boolean partitioned table with NULL partition

2023-04-15 Thread David Kimura
On Wed, Apr 12, 2023 at 4:13 AM David Rowley wrote: > > There seems to be a bunch of tests checking this already, all of them > assuming the incorrect plans. Given that the plan alone wasn't sufficient to catch this error previously, would it be worthwhile to add some data to the tests to make it

Multiple grouping set specs referencing duplicate alias

2022-10-21 Thread David Kimura
e approach I had considered was to update the rewriteHandler to explicitly force the existence of the duplicate alias column in the range tables. But that also felt meh. Does this seem like a legit issue? And if so, any thoughts on alternative approaches? Thanks, Dav

Re: Avoiding hash join batch explosions with extreme skew and weird stats

2020-04-30 Thread David Kimura
On Wed, Apr 29, 2020 at 4:39 PM Melanie Plageman wrote: > > In addition to many assorted TODOs in the code, there are a few major > projects left: > - Batch 0 falling back > - Stripe barrier deadlock > - Performance improvements and testing > Batch 0 never spills. That behavior is an artifact of

Re: Avoiding hash join batch explosions with extreme skew and weird stats

2020-05-04 Thread David Kimura
On Wed, Apr 29, 2020 at 4:44 PM David Kimura wrote: > > Following patch adds logic to create a batch 0 file for serial hash join so > that even in pathalogical case we do not need to exceed work_mem. Updated the patch to spill batch 0 tuples after it is marked as fallback. A couple