Re: Parallel Inserts in CREATE TABLE AS

2020-12-09 Thread Zhihong Yu
Hi, + if (!OidIsValid(col->collOid) && + type_is_collatable(col->typeName->typeOid)) + ereport(ERROR, ... + attrList = lappend(attrList, col); Should attrList be freed when ereport is called ? + query->CTASParallelInsInfo &= CTAS_PARALLEL_INS

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-12-07 Thread Zhihong Yu
at 14:25, Zhihong Yu wrote: > > > > > + /* Make a guess at a good size when we're not given a valid size. > */ > > > + if (size == 0) > > > + size = 1024; > > > > > > Should the default size be logged ? > > > > > I'

Re: Parallel Inserts in CREATE TABLE AS

2020-12-06 Thread Zhihong Yu
Hi, Bharath : + (void) SetCurrentCommandIdUsedForWorker(); + myState->output_cid = GetCurrentCommandId(false); SetCurrentCommandIdUsedForWorker already has void as return type. The '(void)' is not needed. +* rd_createSubid is marked invalid, otherwise, the table is +

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-12-06 Thread Zhihong Yu
would trust your judgment in choosing the percentage. It is fine not to expose this constant until the need arises. Cheers On Sun, Dec 6, 2020 at 5:15 PM David Rowley wrote: > On Sat, 5 Dec 2020 at 16:51, Zhihong Yu wrote: > > > > There are two blocks with almost identical code (

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-12-04 Thread Zhihong Yu
good for debugging. Cheers On Fri, Dec 4, 2020 at 5:09 PM Zhihong Yu wrote: > Hi, David: > For nodeResultCache.c : > > +#define SH_EQUAL(tb, a, b) ResultCacheHash_equal(tb, a, b) == 0 > > I think it would be safer if the comparison is enclosed in parenthes

Hybrid Hash/Nested Loop joins and caching results from subplans

2020-12-04 Thread Zhihong Yu
Hi, David: For nodeResultCache.c : +#define SH_EQUAL(tb, a, b) ResultCacheHash_equal(tb, a, b) == 0 I think it would be safer if the comparison is enclosed in parentheses (in case the macro appears in composite condition). +ResultCacheHash_equal(struct resultcache_hash *tb, const ResultCacheKey

Re: runtime error copying oids field

2020-11-30 Thread Zhihong Yu
Alvaro, et al: Please let me know how to proceed with the patch. Running test suite with the patch showed no regression. Cheers On Mon, Nov 30, 2020 at 3:24 PM Zhihong Yu wrote: > Hi, > See attached patch which is along the line Alvaro outlined. > > Cheers > > On Mon, Nov 3

Re: runtime error copying oids field

2020-11-30 Thread Zhihong Yu
Hi, See attached patch which is along the line Alvaro outlined. Cheers On Mon, Nov 30, 2020 at 3:01 PM Alvaro Herrera wrote: > On 2020-Nov-30, Zhihong Yu wrote: > > > This was the line runtime error was raised: > > > > memcpy(part_oids, partdesc->

runtime error copying oids field

2020-11-30 Thread Zhihong Yu
Hi, In our testPgRegressTrigger test log, I saw the following (this was for a relatively old version of PG): 197859 [ts-1] ../../../../../../src/postgres/src/backend/commands/indexcmds.c:1062:22: runtime error: null pointer passed as argument 2, which is declared to never be null 197860 [ts-1]

<    1   2   3   4   5   6