On Tue, May 9, 2023 at 1:48 AM Ranier Vilela wrote:
> I think you missed list_nth_xid, It makes perfect sense to exist.
>
It seems that list_nth_xid is more about simplification. So maybe we
should put it in 0001?
Thanks
Richard
I happened to notice that the query below can be inefficient.
# explain (costs off)
select * from
int8_tbl a left join
(int8_tbl b inner join
lateral (select *, b.q2 as x from int8_tbl c) ss on b.q2 = ss.q1)
on a.q1 = b.q1;
QUERY PLAN
Has
On Fri, Mar 17, 2023 at 11:05 AM Richard Guo wrote:
> Here is an updated patch with comments and test case. I also change the
> code to store 'group_clause_relids' directly in RestrictInfo.
>
BTW, I've added an open item for this issue.
Thanks
Richard
On Wed, Apr 6, 2022 at 6:18 AM Joe Wildish wrote:
> Hello Hackers,
>
> Reporting a bug with the new MERGE statement. Tested against
> 75edb919613ee835e7680e40137e494c7856bcf9.
>
> psql output as follows:
>
> ...
> psql:merge.sql:33: ERROR: variable not found in subplan target lists
> ROLLBACK
>
On Sat, Apr 9, 2022 at 5:26 AM Alvaro Herrera
wrote:
> On 2022-Apr-06, Richard Guo wrote:
>
> > That's right. The varattno is set to zero for whole-row Var. And in this
> > case these whole-row Vars are not included in the targetlist.
> >
> > Attached is an at
In the executor code, we mix use outerPlanState macro and referring to
leffttree. Commit 40f42d2a tried to keep the code consistent by
replacing referring to lefftree with outerPlanState macro, but there are
still some outliers. This patch tries to clean them up.
Thanks
Richard
v1-0001-Use-outer
On Fri, Apr 15, 2022 at 12:50 AM Robert Haas wrote:
> On Tue, Apr 12, 2022 at 2:57 AM bu...@sohu.com wrote:
> > The cost_subqueryscan function does not judge whether it is parallel.
>
> I don't see any reason why it would need to do that. A subquery scan
> isn't parallel aware.
>
> > regress
> >
The array sortgrouprefs[] inside PathTarget might be NULL if we have not
identified sort/group columns in this tlist. In that case we would have
a NULL pointer reference in _outPathTarget() when trying to print
sortgrouprefs[] with WRITE_INDEX_ARRAY as we are using the length of
PathTarget->exprs a
On Tue, Apr 19, 2022 at 2:53 AM Tom Lane wrote:
>
> A semantics-preserving conversion would have looked something like
>
> if (node->sortgrouprefs)
> WRITE_INDEX_ARRAY(sortgrouprefs, list_length(node->exprs));
>
> I suppose that Peter was trying to remove special cases from the
> outf
On Thu, Apr 21, 2022 at 12:02 AM Peter Eisentraut <
peter.eisentr...@enterprisedb.com> wrote:
> On 18.04.22 09:35, Richard Guo wrote:
> > The array sortgrouprefs[] inside PathTarget might be NULL if we have not
> > identified sort/group columns in this tlist. In that case we
On Thu, Apr 21, 2022 at 5:33 AM Tomas Vondra
wrote:
>
> The difference between plans in (2) and (3) is interesting, because it
> seems the CTE got inlined, so why was the refcount not decremented?
>
The query is not actually referencing the cte. So the cte range table
entry would not appear anyw
On Thu, Apr 21, 2022 at 5:33 AM Tomas Vondra
wrote:
>
> it seems there's something wrong with CTE inlining when there's a view
> containing a correlated subquery referencing the CTE.
>
BTW, seems view is not a necessary condition to reproduce this issue.
For instance:
create table t (a int, b i
On Thu, Apr 21, 2022 at 3:51 PM Richard Guo wrote:
>
> On Thu, Apr 21, 2022 at 5:33 AM Tomas Vondra <
> tomas.von...@enterprisedb.com> wrote:
>
>>
>> it seems there's something wrong with CTE inlining when there's a view
>> containing a correlated s
On Mon, Nov 22, 2021 at 3:04 PM Richard Guo wrote:
>
> The suggested changes have already been included in v5 patch. Sorry for
> the confusion.
>
> Verified that the patch still applies and works on latest master. So I'm
> moving it to the next CF (which is Commitfest 2
On Thu, Oct 12, 2023 at 1:09 AM Tom Lane wrote:
> Pushed after a bit of fiddling with the comment.
Thanks for pushing!
Thanks
Richard
On Fri, Oct 13, 2023 at 6:18 PM Andrei Lepikhov
wrote:
> On 23/8/2023 12:37, Richard Guo wrote:
> > To fix it we may need to modify RelOptInfos for Path, BitmapHeapPath,
> > ForeignPath and CustomPath, and modify IndexOptInfos for IndexPath. It
> > seems that that is no
On Thu, Oct 19, 2023 at 10:35 AM Peter Smith wrote:
> Hi.
>
> I happened upon a function comment referring to non-existent code
> (that code was moved to another location many years ago).
>
> Probably better to move that comment too. Thoughts?
Agreed. +1 to move that comment.
Thanks
Richard
I noticed $subject with the query below.
set enable_memoize to off;
explain (analyze, costs off)
select * from tenk1 t1 left join lateral
(select t1.two as t1two, * from tenk1 t2 offset 0) s
on t1.two = s.two;
QUERY PLAN
---
On Fri, Oct 20, 2023 at 6:40 PM Richard Guo wrote:
> I haven't thought thoroughly about the fix yet. But one way I'm
> thinking is that in create_subqueryscan_plan() we can first add the
> subquery's subplan_params to root->curOuterParams, and then replace
> outer
On Fri, Oct 20, 2023 at 7:43 PM Pavel Stehule
wrote:
> +1
>
> it would be great to fix this problem - I've seen this issue a few times.
>
Thanks for the input. I guess this is not rare in the real world. If
the subquery contains lateral reference to a Var that also appears in
the subquery's jo
On Tue, Oct 24, 2023 at 6:00 PM Alena Rybakina
wrote:
> I agree with you, and we can indeed directly set the param_info value to
> NULL, and there are enough comments here to explain.
>
> I didn't find anything else to add in your patch.
Thanks for reviewing this patch!
Thanks
Richard
On Thu, Oct 26, 2023 at 12:07 PM Andrei Lepikhov
wrote:
> Do you've thought about the case, fixed with the commit 1db5667? As I
> see, that bugfix still isn't covered by regression tests. Could your
> approach of a PARAM_EXEC slot reusing break that case?
Hm, I don't think so. The issue fixed
On Mon, Oct 30, 2023 at 7:31 PM Alena Rybakina
wrote:
> I have already written about the problem of InvalidPath [0] appearing. I
> investigated this and found an error in the add_path() function, when we
> reject a path, we free up the memory of the path, but do not delete various
> mentions of i
On Tue, Oct 31, 2023 at 1:36 PM Andrei Lepikhov
wrote:
> On 30/10/2023 14:55, Richard Guo wrote:
> >
> > On Thu, Oct 26, 2023 at 12:07 PM Andrei Lepikhov
> > mailto:a.lepik...@postgrespro.ru>> wrote:
> >
> > Do you've thought about the case, fix
On Thu, Aug 10, 2023 at 3:24 PM Richard Guo wrote:
> The cfbot reminds that this patch does not apply any more, so rebase it
> to v2.
>
Attached is another rebase over the latest master. Any feedback is
appreciated.
Thanks
Richard
v3-0001-Support-Right-Semi-Join-plan-sha
On Tue, Aug 29, 2023 at 6:41 PM Richard Guo wrote:
> So it seems that the new costing logic is quite crude and tends to be
> very conservative, but it can help avoid the large overhead in the worst
> cases. I think this might be a good start to push this patch forward.
>
>
On Thu, Nov 2, 2023 at 3:19 PM David Rowley wrote:
> I'm not yet seeing any failures in the buildfarm, so don't really want
> to push a fix for this one if there are going to be a few more
> unstable ones to fix. I may just hold off a while to see.
It seems that the test is still not stable on
On Tue, Sep 26, 2023 at 9:51 AM Richard Guo wrote:
> On Tue, Sep 26, 2023 at 5:45 AM Tom Lane wrote:
>
>> I'm inclined to write the comment more like "Usually the equal()
>> check is redundant, but in setop plans it may not be, since
>> prepunion.c assigns r
On Thu, Sep 7, 2023 at 11:09 PM Aleksander Alekseev <
aleksan...@timescale.com> wrote:
> Probably it's just because of my limited experience with the optimizer
> but I don't find the proposed change particularly straightforward. I
> would suggest adding a comment before the Assert's and/or a detai
On Sat, Nov 4, 2023 at 6:00 PM Alexander Lakhin wrote:
> 02.11.2023 14:19, Richard Guo wrote:
>
> However, the cfbot indicates that there are test cases that fail on
> FreeBSD [1] (no failure on other platforms). So I set up a FreeBSD-13
> locally but just cannot reproduce the f
I came across the following compiling warnings on GCC (Red Hat 4.8.5-44)
4.8.5 with 'CFLAGS=-Og'
be-fsstubs.c: In function ‘be_lo_export’:
be-fsstubs.c:537:24: warning: ‘fd’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (CloseTransientFile(fd) != 0)
On Mon, Nov 6, 2023 at 2:51 PM David Rowley wrote:
> On Mon, 6 Nov 2023 at 19:14, Richard Guo wrote:
> > I came across the following compiling warnings on GCC (Red Hat 4.8.5-44)
> > 4.8.5 with 'CFLAGS=-Og'
>
> > I wonder if this is worth fixing, maybe by
On Mon, Nov 6, 2023 at 11:00 PM Alexander Lakhin
wrote:
> Please look at a warning and an assertion failure triggered by the
> following script:
> set parallel_setup_cost = 0;
> set parallel_tuple_cost = 0;
> set min_parallel_table_scan_size = '1kB';
>
> create table t1 (i int) partition by range
While working on BUG #18187 [1], I noticed that we also have issues with
how SJE replaces join clauses involving the removed rel. As an example,
consider the query below, which would trigger an Assert.
create table t (a int primary key, b int);
explain (costs off)
select * from t t1
inner joi
On Thu, Nov 9, 2023 at 6:45 AM Tom Lane wrote:
> The existing RTE_SUBQUERY stanza has most of what we need for this,
> so I experimented with extending that to also handle RTE_CTE. It
> seems to work, though I soon found out that it needed tweaking for
> the case where the CTE is INSERT/UPDATE/D
On Fri, Nov 17, 2023 at 2:16 AM Tom Lane wrote:
> So you could argue that there's more to do here, but I'm hesitant
> to go further. Part of the point of MATERIALIZED is to be an
> optimization fence, so breaking down that fence is something to be
> wary of. Maybe we shouldn't even take this pa
On Thu, Nov 16, 2023 at 11:25 PM Alena Rybakina
wrote:
> I noticed that this query worked correctly in the main branch with the
> inequality operator:
>
> postgres=# select distinct on (a, b) a, b from (values (3, 1), (2, 2)) as
> t (a, b) where a > b group by grouping sets((a, b), (a)); a | b --
On Fri, Nov 17, 2023 at 11:38 AM Tom Lane wrote:
> That line of argument also leads to the conclusion that it'd be
> okay to expose info about the ordering of the CTE result to the
> upper planner. This patch doesn't do that, and I'm not sufficiently
> excited about the issue to go write some co
On Fri, Nov 17, 2023 at 11:38 AM Tom Lane wrote:
> That line of argument also leads to the conclusion that it'd be
> okay to expose info about the ordering of the CTE result to the
> upper planner. This patch doesn't do that, and I'm not sufficiently
> excited about the issue to go write some co
On Tue, Nov 21, 2023 at 1:46 AM Tom Lane wrote:
> * Do we really need to use make_tlist_from_pathtarget? Why isn't
> the tlist of the cteplan good enough (indeed, more so)?
I think you are right. The cteplan->targetlist is built for the CTE's
best path by build_path_tlist(), which is almost t
On Sun, Nov 19, 2023 at 9:17 AM Alexander Korotkov
wrote:
> It's here. New REALLOCATE_BITMAPSETS forces bitmapset reallocation on
> each modification.
+1 to the idea of introducing a reallocation mode to Bitmapset.
> I had the feeling of falling into a rabbit hole while debugging all
> the c
On Fri, Nov 24, 2023 at 12:06 PM David Rowley wrote:
> In the attached, I've adjusted the code to use the latter of the two
> above methods in 3 places. In examine_variable() this reduces the
> complexity of the logic quite a bit and saves calling bms_is_member()
> in addition to bms_singleton_m
On Sun, Nov 26, 2023 at 4:06 AM Tomas Vondra
wrote:
> I've done a bit more cleanup on the last version of the patch (renamed
> the fields to start with bis_ as agreed, rephrased the comments / docs /
> commit message a bit) and pushed.
It seems that we have an oversight in this commit. If ther
On Mon, Nov 27, 2023 at 1:50 PM Michael Paquier wrote:
> I have noticed that GetHeapamTableAmRoutine() is listed as being a
> member of tableamapi.c but it is a convenience routine located in
> heapam_handler.c. Shouldn't the header be fixed with something like
> the attached?
+1. Nice catch.
On Mon, Nov 27, 2023 at 1:53 PM Soumyadeep Chakraborty <
soumyadeep2...@gmail.com> wrote:
> On Sun, Nov 26, 2023 at 9:28 PM Richard Guo
> wrote:
> > It seems that we have an oversight in this commit. If there is no tuple
> > that has been inserted, we wouldn't have
The comment of search_indexed_tlist_for_var says:
* In debugging builds, we cross-check the varnullingrels of the subplan
* output Var based on nrm_match.
However, this cross-check will also be performed in non-debug builds
ever since commit 867be9c07, which converts this check from Asserts to
On Tue, Nov 28, 2023 at 8:19 PM Heikki Linnakangas wrote:
> On 03/11/2023 08:10, Richard Guo wrote:
> > On Tue, Sep 26, 2023 at 9:51 AM Richard Guo > <mailto:guofengli...@gmail.com>> wrote:
> > On Tue, Sep 26, 2023 at 5:45 AM Tom Lane > <
On Sat, Dec 2, 2023 at 2:27 AM Tom Lane wrote:
> Alvaro Herrera writes:
> > On 2023-Dec-01, Richard Guo wrote:
> >> However, this cross-check will also be performed in non-debug builds
> >> ever since commit 867be9c07, which converts this check from Asserts to
>
On Tue, Dec 5, 2023 at 12:31 AM Tristan Partin wrote:
> On Mon Dec 4, 2023 at 6:49 AM CST, Heikki Linnakangas wrote:
> > This came up in the "Refactoring backend fork+exec code" thread recently
> > [0], but is independent of that work:
> >
> > Here's a patch to allocate and initialize it with a p
On Fri, Oct 20, 2023 at 2:52 AM Alena Rybakina
wrote:
> Thank you for your work on the subject.
>
Thanks for taking an interest in this patch.
> During review your patch I didn't understand why are you checking that the
> variable is path and not new_path of type T_SamplePath (I highlighted it)
I've self-reviewed this patch again and I think it's now in a
committable state. I'm wondering if we can mark it as 'Ready for
Committer' now, or we need more review comments/feedbacks.
To recap, this patch postpones reparameterization of paths until
createplan.c, which would help avoid building
On Mon, Sep 25, 2023 at 3:11 PM Richard Guo wrote:
> If the grouping expression is a Var or PHV, we can just set its
> nullingrels, very straightforward. For an expression that is neither a
> Var nor a PHV, I'm not quite sure how to set the nullingrels. I tried
> the idea of
On Fri, Dec 8, 2023 at 3:13 PM Alexander Pyhalov
wrote:
> Andrei Lepikhov писал(а) 2023-12-08 07:37:
> > I'd already clashed with Tom on copying the required_relids field and
> > voluntarily made unnecessary copies in the project [1].
> > And ... stuck into huge memory consumption. The reason was
On Fri, Dec 8, 2023 at 5:39 PM Alena Rybakina
wrote:
> On 06.12.2023 10:30, Richard Guo wrote:
> > I've self-reviewed this patch again and I think it's now in a
> > committable state. I'm wondering if we can mark it as 'Ready for
> > Committer'
On Tue, Dec 12, 2023 at 4:40 PM Nicolas Lutic wrote:
> I've come across a behaviour of the planner I can't explain.
> After a migration from 11 to 15 (on RDS) we noticed a degradation in
> response time on a query, it went from a few seconds to ten minutes.
> A vacuum(analyze) has been realized t
On Thu, Dec 14, 2023 at 6:02 PM Richard Guo wrote:
> It seems that we need to improve estimate of distinct values in
> estimate_num_groups() when taking the selectivity of restrictions into
> account.
>
> In 84f9a35e3 we changed to a new formula to perform such estimation.
>
On Mon, Dec 18, 2023 at 7:31 AM Tomas Vondra
wrote:
> Oh! Now I see what you meant by using the new formula in 84f9a35e3
> depending on how we sum tuples. I agree that seems like the right thing.
>
> I'm not sure it'll actually help with the issue, though - if I apply the
> patch, the plan does n
By chance I discovered that the comment for the typedefs of "double"s
does not cover Cardinality. Should we update that comment accordingly,
maybe something like below?
- * Typedefs for identifying qualifier selectivities and plan costs as such.
- * These are just plain "double"s, but declaring a
On Tue, Dec 19, 2023 at 10:50 PM Peter Eisentraut
wrote:
> On 19.12.23 07:23, Richard Guo wrote:
> > By chance I discovered that the comment for the typedefs of "double"s
> > does not cover Cardinality. Should we update that comment accordingly,
>
I came across the 'missing braces' warning again when building master
(0a93f803f4) on old GCC (4.8.5).
blkreftable.c: In function ‘BlockRefTableSetLimitBlock’:
blkreftable.c:268:2: warning: missing braces around initializer
[-Wmissing-braces]
BlockRefTableKey key = {0}; /* make sure any padding
On Thu, Jul 13, 2023 at 3:12 PM Richard Guo wrote:
> So I'm wondering if it'd be better that we move all this logic of
> computing additional lateral references within PHVs to get_memoize_path,
> where we can examine only PHVs that are evaluated at innerrel. And
> consider
On Sat, Dec 23, 2023 at 1:32 AM Tom Lane wrote:
> Heikki Linnakangas writes:
> > On 22/12/2023 17:24, Tom Lane wrote:
> >> How much of your patchset still makes sense if we assume that we
> >> can always extract the ORDER BY column values from the index?
>
> > That would make it much less intere
On Fri, Dec 22, 2023 at 2:38 AM Heikki Linnakangas wrote:
> v1-0004-Omit-columns-from-final-tlist-that-were-only-need.patch
>
> The main patch in this series.
This patch filters out the junk columns created for ORDER BY/GROUP BY,
and retains the junk columns created for RowLocks. I'm afraid th
While reviewing Heikki's Omit-junk-columns patchset[1], I noticed that
root->upper_targets[] is used to set target for partial_distinct_rel,
which is not great because root->upper_targets[] is not supposed to be
used by the core code. The comment in grouping_planner() says:
* Save the various u
On Wed, Dec 27, 2023 at 12:27 AM Umair Shahid
wrote:
> Commit cac169d686eddb277880a0d8a760ac3007b4846a updated the default value
> of fdw_tuple_cost from 0.01 to 0.2. The attached patch updates the docs to
> reflect this change.
>
+1. Nice catch.
Thanks
Richard
>
The Asserts added to bitmapset.c by commits 71a3e8c43b and 7d58f2342b
contain some duplicates, such as in bms_difference, bms_is_subset,
bms_subset_compare, bms_int_members and bms_join. For instance,
@@ -953,6 +1033,15 @@ bms_int_members(Bitmapset *a, const Bitmapset *b)
int
On Wed, Dec 27, 2023 at 7:38 PM Andy Fan wrote:
> I also want to add notnullattnums for the UniqueKey stuff as well, by
> comparing your implementation with mine, I found you didn't consider
> the NOT NULL generated by filter. After apply your patch:
>
> create table a(a int);
> explain (costs o
On Wed, Dec 27, 2023 at 8:00 PM Alexander Korotkov
wrote:
> On Wed, Dec 27, 2023 at 1:54 PM Andreas Seltenreich
> wrote:
> > SQLsmith found a failing Assertion in joininfo.c on master. I can
> > reproduce it on an assertion-enabled build like this:
> >
> > create table t1(a int primary key);
>
On Fri, Dec 29, 2023 at 9:15 AM David Rowley wrote:
> I looked into this a bit more and I just can't see why the current
> code feels like it must do the reallocation in functions such as
> bms_del_members(). We don't repalloc the set there, ever, so why do
> we need to do it when building with
On Fri, Dec 29, 2023 at 5:22 PM David Rowley wrote:
> On Fri, 29 Dec 2023 at 21:07, Richard Guo wrote:
> > It seems to me that the former scenario also makes sense in some cases.
> > For instance, let's say there are two pointers in two structs, s1->p and
> > s2-
On Sun, Dec 31, 2023 at 6:44 AM David Rowley wrote:
> On Fri, 29 Dec 2023 at 23:38, Richard Guo wrote:
> > After applying this process to the first RestrictInfo, the bitmapset now
> > becomes {t2, t3}. Consequently, the second RestrictInfo also perceives
> > {t2, t3} a
Thanks for the review!
On Sat, Jan 6, 2024 at 2:36 AM Robert Haas wrote:
> Richard, I think it could be useful to put a better commit message
> into the patch file, describing both what problem is being fixed and
> what the design of the fix is. I gather that the problem is that we
> crash if th
On Sun, Jan 7, 2024 at 6:41 AM Tom Lane wrote:
> Alexander Lakhin writes:
> > Please look at the following query:
> > CREATE TABLE t(i int);
> > INSERT INTO t VALUES (1);
> > VACUUM ANALYZE t;
>
> > WITH ir AS (INSERT INTO t VALUES (2) RETURNING i)
> > SELECT * FROM ir WHERE i = 2;
>
> > which p
On Sun, Jan 7, 2024 at 3:03 PM vignesh C wrote:
> One of the tests in CFBot has failed at [1] with:
> - Relations: (public.ft1 t1) SEMI JOIN (public.ft2 t2)
> - Remote SQL: SELECT r1."C 1", r1.c2, r1.c3, r1.c4, r1.c5, r1.c6,
> r1.c7, r1.c8 FROM "S 1"."T 1" r1 WHERE ((r1."C 1" < 20)) AND EXIST
On Tue, Apr 11, 2023 at 11:43 AM Andy Fan wrote:
> On Tue, Apr 11, 2023 at 11:03 AM Richard Guo
> wrote:
>
>> As the comment above add_path() says, 'The pathlist is kept sorted by
>> total_cost, with cheaper paths at the front.' And it seems that
>> g
On Fri, Aug 25, 2023 at 11:03 AM David Rowley wrote:
> I'd suggest writing some cost which costs an execution of run-time
> pruning. With LIST and RANGE you probably want something like
> cpu_operator_cost * LOG2(nparts) once for each hashed tuple to account
> for the binary search over the sort
On Wed, Aug 30, 2023 at 8:49 AM Michael Paquier wrote:
> There is much more going on with -Wshadow, but let's do things
> incrementally, case by case.
Yeah, IIRC the source tree currently is able to be built without any
shadow-related warnings with -Wshadow=compatible-local. But with
-Wshadow
On Tue, Aug 29, 2023 at 5:08 PM Etsuro Fujita
wrote:
> Another thing I would like to propose is minor adjustments to the docs
> related to parallel query:
>
> A custom scan provider will typically add paths for a base relation by
> setting the following hook, which is called after the cor
While working on a bug in expandRecordVariable() I noticed that in the
switch statement for case RTE_SUBQUERY we initialize struct ParseState
with {0} while for case RTE_CTE we do that with MemSet. I understand
that there is nothing wrong with this, just cannot get away with the
inconsistency insi
On Thu, Aug 31, 2023 at 7:07 PM John Naylor
wrote:
> > On Thu, Aug 31, 2023 at 5:34 PM Richard Guo
> wrote:
> > >
> > > While working on a bug in expandRecordVariable() I noticed that in the
> > > switch statement for case RTE_SUBQUERY we initialize struct
I ran into an Assert failure in ATPrepAddPrimaryKey() with the query
below:
CREATE TABLE t0(c0 boolean);
CREATE TABLE t1() INHERITS(t0);
# ALTER TABLE t0 ADD CONSTRAINT m EXCLUDE ((1) WITH =);
server closed the connection unexpectedly
The related codes are
foreach(lc, stmt->indexParams)
On Fri, Sep 1, 2023 at 7:48 PM Alvaro Herrera
wrote:
> On 2023-Sep-01, Richard Guo wrote:
>
> > I ran into an Assert failure in ATPrepAddPrimaryKey() with the query
> > below:
> >
> > CREATE TABLE t0(c0 boolean);
> > CREATE TABLE t1() INHERITS(t0);
>
On Tue, Sep 5, 2023 at 4:52 PM tender wang wrote:
>I recently run benchmark[1] on master, but I found performance problem
> as below:
> ...
>
> I debug the code and find consider_parallel_nestloop() doesn't consider
> materialized form of the cheapest inner path.
>
Yeah, this seems an omissi
On Mon, May 8, 2023 at 10:30 AM Richard Guo wrote:
> I'd like to devise a test query that shows performance gain from this
> patch, but I'm not sure how to do that. May need help here.
>
I've been trying for some time but still haven't been able to come up
wi
On Wed, Sep 6, 2023 at 8:50 PM Robert Haas wrote:
> On Wed, Sep 6, 2023 at 2:45 AM Andy Fan wrote:
> > In my opinion, we can do some stuff to improve the ROI.
> > - Authors should do as much as possible, mainly a better commit
> > message. As for this patch, the commit message is " Adjustmen
On Fri, Sep 8, 2023 at 3:15 AM Robert Haas wrote:
> The example query provided here seems rather artificial. Surely few
> people write a join clause that references neither of the tables being
> joined. Is there a more realistic case where this makes a big
> difference?
Yes the given example qu
On Fri, Sep 8, 2023 at 2:42 AM Robert Haas wrote:
> Committed.
Thanks for pushing it!
Thanks
Richard
On Fri, Sep 8, 2023 at 3:04 PM Ashutosh Bapat
wrote:
> When the clause s.t1b = s.a is presented to distribute_qual_to_rels()
> it has form PHV(t1.b) = t2.b. The PHV's ph_eval_at is 4, which is what
> is returned as varno to pull_varnos(). The other Var in the caluse has
> varno = 4 already so pu
On Mon, Sep 18, 2023 at 10:02 PM Justin Pryzby wrote:
> This fails since 1349d2790b
>
> commit 1349d2790bf48a4de072931c722f39337e72055e
> Author: David Rowley
> Date: Tue Aug 2 23:11:45 2022 +1200
>
> Improve performance of ORDER BY / DISTINCT aggregates
>
> ts=# CREATE TABLE t (a int, b t
On Tue, Sep 19, 2023 at 5:37 PM Peter Eisentraut
wrote:
> On 31.08.23 10:32, Richard Guo wrote:
> > While working on a bug in expandRecordVariable() I noticed that in the
> > switch statement for case RTE_SUBQUERY we initialize struct ParseState
> > with {0} while for ca
I think I've come across a wrong result issue with grouping sets, as
shown by the query below.
-- result is correct with only grouping sets
select a, b
from (values (1, 1), (2, 2)) as t (a, b) where a = b
group by grouping sets((a, b), (a));
a | b
---+---
1 | 1
1 |
2 | 2
2 |
(4 rows)
-- resu
I noticed a wrong comment in search_indexed_tlist_for_sortgroupref().
foreach(lc, itlist->tlist)
{
TargetEntry *tle = (TargetEntry *) lfirst(lc);
/* The equal() check should be redundant, but let's be paranoid */
if (tle->ressortgroupref == sortgroupref &&
On Tue, Sep 26, 2023 at 5:45 AM Tom Lane wrote:
> Hmm. This kind of makes me itch, because in principle a ressortgroupref
> identifier should uniquely identify a sorting/grouping column. If it
> fails to do so here, maybe there are outright bugs lurking elsewhere?
>
> I poked into it a little a
In relation_excluded_by_constraints() when we're trying to figure out
whether the relation need not be scanned, one of the checks we do is to
detect constant-FALSE-or-NULL restriction clauses. Currently we perform
this check only when there is exactly one baserestrictinfo entry, and
the comment ex
On Mon, Sep 25, 2023 at 3:11 PM Richard Guo wrote:
> I think the root cause is that when we generate distinct_pathkeys, we
> failed to realize that Var 'b' might be nullable by the grouping sets,
> so it's no longer always equal to Var 'a'. It's not correc
I just noticed that e8c334c47a fixes typos in e0b1ee17dc. I think there
is an omission in _bt_readpage.
--- a/src/backend/access/nbtree/nbtsearch.c
+++ b/src/backend/access/nbtree/nbtsearch.c
@@ -1784,7 +1784,7 @@ _bt_readpage(IndexScanDesc scan, ScanDirection dir,
OffsetNumber offnum)
On Thu, Oct 5, 2023 at 2:26 PM David Rowley wrote:
> So in short, I propose the attached fix without any regression tests
> because I feel that any regression test would just mark that there was
> a big in create_agg_path() and not really help with ensuring we don't
> end up with some similar pro
On Mon, Oct 9, 2023 at 7:42 AM David Rowley wrote:
> On Sun, 8 Oct 2023 at 23:52, Richard Guo wrote:
> > If the pathkeys that were added by adjust_group_pathkeys_for_groupagg()
> > are computable from the targetlist, it seems that we do not need to trim
> &
On Mon, Oct 9, 2023 at 12:13 PM David Rowley wrote:
> I've now pushed the patch that trims off the Pathkeys for the ORDER BY
> / DISTINCT aggregates.
Thanks for pushing!
> Those results are a bit noisy. Perhaps a few more runs might yield
> more consistency, but it seems that there's not too
I came across a crash in add_paths_to_append_rel() with the query below.
create table t (a int);
create table inh (b int);
create table inh_child() inherits(inh);
explain (costs off)
select * from t left join lateral (select t.a from inh) on true limit 1;
server closed the connection unexpectedl
201 - 300 of 934 matches
Mail list logo