Re: SSL SNI

2021-02-15 Thread Jesse Zhang
Hi Peter, I imagine this also (finally) opens up the possibility for the server to present a different certificate for each hostname based on SNI. This eliminates the requirement for wildcard certs where the cluster is running on a host with multiple (typically two to three) hostnames and the clien

Re: upcoming API changes for LLVM 12

2020-11-02 Thread Jesse Zhang
Hi Andres, On Thu, Oct 15, 2020 at 6:12 PM Andres Freund wrote: > > Hi, > > There will be a breaking API change for JIT related API in LLVM > 12. Mostly about making control over various aspects easier, and then > building on top of that providing new features (like JIT compiling in > the backgro

Re: Have we tried to treat CTE as SubQuery in planner?

2020-11-13 Thread Jesse Zhang
Hi, On Fri, Nov 13, 2020 at 10:04 PM Andy Fan wrote: > > Hi: > > Take the following example: > > insert into cte1 select i, i from generate_series(1, 100)i; > create index on cte1(a); > > explain > with cte1 as (select * from cte1) > select * from c where a = 1; > ITYM: EXPLAIN WITH c AS (

Re: run pgindent on a regular basis / scripted manner

2020-08-12 Thread Jesse Zhang
Hi Andres, On Wed, Aug 12, 2020 at 3:34 PM Andres Freund wrote: > > Hi, > > When developing patches I find it fairly painful that I cannot re-indent > patches with pgindent without also seeing a lot of indentation changes > in unmodified parts of files. It is easy enough ([1]) to only re-indent >

Re: run pgindent on a regular basis / scripted manner

2020-08-12 Thread Jesse Zhang
On Wed, Aug 12, 2020 at 10:14 PM Tom Lane wrote: > > Noah Misch writes: > > ... Another advantage of master-only is a guarantee against > > disrupting time-critical patches. (It would be ugly to push back branches > > and > > sort out the master push later, but it doesn't obstruct the mission.)

Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur

2020-09-02 Thread Jesse Zhang
Hi Peter, Yeah it's funny I got this immediately after upgrading to Big Sur (beta 5). I found commit 1c0cf52b39ca3 but couldn't quite find the mailing list thread on it from 4 years ago (it lists Heikki and Thomas Munro as reviewers). Was it prompted by a similar error you encountered? On Tue, Au

Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur

2020-09-02 Thread Jesse Zhang
Wow thanks Alvaro! My search of "most obvious keywords" didn't turn this up. On Wed, Sep 2, 2020 at 2:18 PM Alvaro Herrera wrote: > > On 2020-Sep-02, Jesse Zhang wrote: > > > Hi Peter, > > > > Yeah it's funny I got this immediately after up

Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur

2020-09-03 Thread Jesse Zhang
Hi Tom and Peter, On Wed, Sep 2, 2020 at 10:40 PM Tom Lane wrote: > > Peter Eisentraut writes: > > On 2020-09-02 22:43, Jesse Zhang wrote: > >> | conftest.c:184:3: error: implicitly declaring library function > >> 'exit' with type 'void (int) __attr

Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur

2020-09-04 Thread Jesse Zhang
On Thu, Sep 3, 2020 at 10:36 AM Tom Lane wrote: > > Jesse Zhang writes: > >> Peter Eisentraut writes: > >>> Where did the -Werror come from? > > > If you noticed the full invocation of clang, you'd notice that Werror is > > nowhere on the comma

Re: Use compiler intrinsics for bit ops in hash

2020-01-14 Thread Jesse Zhang
Hi David, On Tue, Jan 14, 2020 at 9:36 AM David Fetter wrote: > > Folks, > > The recent patch for distinct windowing aggregates contained a partial > fix of the FIXME that didn't seem entirely right, so I extracted that > part, changed it to use compiler intrinsics, and submit it here. The chang

Re: Use compiler intrinsics for bit ops in hash

2020-01-15 Thread Jesse Zhang
ct there are places it could go, if > I look for them. Also, it seemed silly to have one without the other. > While not absolutely required, I'd like us to find at least one place and start using it. (Clang also nags at me when we have unused functions). > On Tue, Jan 14, 2020 at 12:

Re: Parallel grouping sets

2020-01-24 Thread Jesse Zhang
On Thu, Jan 23, 2020 at 2:47 AM Amit Kapila wrote: > > On Sun, Jan 19, 2020 at 2:23 PM Richard Guo wrote: > > > > I realized that there are two patches in this thread that are > > implemented according to different methods, which causes confusion. > > > > Both the idea seems to be different. Is

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

2020-06-24 Thread Jesse Zhang
Hi Tomas, On Tue, Jun 23, 2020 at 3:24 PM Tomas Vondra wrote: > > Now, a couple comments / questions about the code. > > > nodeHash.c > -- > > > 1) MultiExecPrivateHash says this > >/* > * Not subject to skew optimization, so either insert normally > * or save to batch file if

Strange behavior with polygon and NaN

2020-06-24 Thread Jesse Zhang
Hi hackers, While working with Chris Hajas on merging Postgres 12 with Greenplum Database we stumbled upon the following strange behavior in the geometry type polygon: -- >8 CREATE TEMP TABLE foo (p point); CREATE INDEX ON foo USING gist(p); INSERT INTO foo VALUES ('0,0'), ('1,1'),

Fix header identification

2020-07-13 Thread Jesse Zhang
a personal template... Cheers, Jesse From 55c7280ee09ab258efc1c59b4ce6226228bcbab0 Mon Sep 17 00:00:00 2001 From: Jesse Zhang Date: Thu, 9 Jul 2020 13:39:39 -0700 Subject: [PATCH] Fix header identification. jsonfuncs.h was created in ce0425b162d0a to house backend-only json function declarations pre

Re: Volatile Functions in Parallel Plans

2020-07-15 Thread Jesse Zhang
Hi Zhenghua, On Wed, Jul 15, 2020 at 5:44 AM Zhenghua Lyu wrote: > > Hi, > I test some SQL in the latest Postgres master branch code (we find these > issues when > developing Greenplum database in the PR > https://github.com/greenplum-db/gpdb/pull/10418, > and my colleague come up with the f

Re: Volatile Functions in Parallel Plans

2020-07-16 Thread Jesse Zhang
Hi Tom and Zhenghua, On Thu, Jul 16, 2020 at 8:18 AM Tom Lane wrote: > > Jesse Zhang writes: > > You are right, no they are not consistent. But Neither plans is > > incorrect: > > > 1. In the first query, it's semantically permissible to evaluate > > time

Properly mark NULL returns in numeric aggregates

2020-04-09 Thread Jesse Zhang
Hi hackers, We found that several functions -- namely numeric_combine, numeric_avg_combine, numeric_poly_combine, and int8_avg_combine -- are returning NULL without signaling the nullity of datum in fcinfo.isnull. This is obscured by the fact that the only functions in core (finalfunc for various

Re: Properly mark NULL returns in numeric aggregates

2020-04-10 Thread Jesse Zhang
Hi Andres, On Fri, Apr 10, 2020 at 12:14 PM Andres Freund wrote: > > Shouldn't these just be marked as strict? > Are you suggesting that because none of the corresponding trans functions (int8_avg_accum, int2_accum, and friends) ever output NULL? That's what we thought, but then I realized that

Re: Properly mark NULL returns in numeric aggregates

2020-04-13 Thread Jesse Zhang
On Fri, Apr 10, 2020 at 3:59 PM Tom Lane wrote: > > They can't be strict because the initial iteration needs to produce > something from a null state and non-null input. nodeAgg's default > behavior won't work for those because nodeAgg doesn't know how to > copy a value of type "internal". > >

Re: Properly mark NULL returns in numeric aggregates

2020-04-14 Thread Jesse Zhang
Hi David, On Mon, Apr 13, 2020 at 10:46 PM David Rowley wrote: > > On Tue, 14 Apr 2020 at 06:14, Tom Lane wrote: > > Yeah, they're relying exactly on the assumption that nodeAgg is not > > going to try to copy a value declared "internal", and therefore they > > can be loosey-goosey about whether

Header / Trailer Comment Typos for M4 macros

2020-04-22 Thread Jesse Zhang
Jesse From 73c15bfdea388347455810c3eb98dbff235d3d08 Mon Sep 17 00:00:00 2001 From: Jesse Zhang Date: Wed, 22 Apr 2020 06:51:05 -0700 Subject: [PATCH] Fix header / trailer typos for m4 macros These seem like legit names in earlier iterations of respective patches (commit b779168ffe33 "Detect PG_PRINTF_ATTRIBUTE automatical

Re: Header / Trailer Comment Typos for M4 macros

2020-04-22 Thread Jesse Zhang
On Wed, Apr 22, 2020 at 12:29 PM Tom Lane wrote: > > Jesse Zhang writes: > > either way: either changing the macro names or changing the comment. PFA > > a patch that keeps the macro names. > > Pushed, thanks. > Thanks! > > Also in hindsight: it seems that,

Fix compilation failure against LLVM 11

2020-04-25 Thread Jesse Zhang
ct/commit/2c24051bacd2 "[CallSite removal] Rename CallSite.h to AbstractCallSite.h. NFC" From 27084a0ebd37176f0a831042457e27cad8ac70eb Mon Sep 17 00:00:00 2001 From: Jesse Zhang Date: Sat, 25 Apr 2020 16:24:33 -0700 Subject: [PATCH] Remove unused include LLVM has recently removed "l

Re: Fix compilation failure against LLVM 11

2020-04-27 Thread Jesse Zhang
Hi Michael, On Sun, Apr 26, 2020 at 11:21 PM Michael Paquier wrote: > > On Sat, Apr 25, 2020 at 09:41:20PM -0700, Jesse Zhang wrote: > > I searched my inbox and the archive, strange that nobody else is seeing > > this. > > > > Turns out that LLVM has recently r

Re: Fix compilation failure against LLVM 11

2020-04-28 Thread Jesse Zhang
Hi Michael, On Mon, Apr 27, 2020 at 9:56 PM Michael Paquier wrote: > rather soon, it looks like LLVM releases a new major version every 3 > months or so. FYI LLVM has a six-month release cadence [1], the next release is expected coming September (I can't tell whether you were joking). Cheers, Je

Re: do {} while (0) nitpick

2020-05-04 Thread Jesse Zhang
Hi Tom, On Fri, May 1, 2020 at 2:32 PM Tom Lane wrote: > > Grepping showed me that there were some not-do-while macros that > also had trailing semicolons. These seem just as broken, so I > fixed 'em all. > I'm curious: *How* are you able to discover those occurrences with grep? I understand how

Re: Fix compilation failure against LLVM 11

2020-05-27 Thread Jesse Zhang
020-04-28 13:56:23 +0900, Michael Paquier wrote: MP> > On Mon, Apr 27, 2020 at 07:48:54AM -0700, Jesse Zhang wrote: JZ> > > Are you expressing a concern against "churning" this part of the JZ> > > code in reaction to upstream LLVM changes? I'd agree with you in

Re: Fix compilation failure against LLVM 11

2020-05-28 Thread Jesse Zhang
On Thu, May 28, 2020 at 1:07 AM Michael Paquier wrote: > Please note that I would still wait for their next GA release to plug > in any extra holes at the same time. @Jesse: or is this change > actually part of the upcoming 10.0.1? No a refactoring like this was not in the back branches (nor is

Re: A small note on the portability of cmake

2019-01-19 Thread Jesse Zhang
On Sat, Jan 19, 2019 at 8:50 AM Tom Lane wrote: > > Failed miserably. It turns out cmake has a hard dependency on libuv > which (a) has a hard dependency on atomic ops and (b) according to its > own docs, doesn't really care about any platforms other than > Linux/macOS/Windows and maybe FreeBSD.>

Re: [PATCH] Fix Proposal - Deadlock Issue in Single User Mode When IO Failure Occurs

2018-12-01 Thread Jesse Zhang
Hey Chengyu, How did you set up your GDB to get "p" to pretty-print a Postgres list? Cheers, Jesse On Fri, Nov 30, 2018 at 1:00 PM Chengchao Yu wrote: > Greetings, > > > > Recently, we hit a few occurrences of deadlock when IO failure (including > disk full, random remote disk IO failures) happ

Re: Parallel grouping sets

2020-02-03 Thread Jesse Zhang
On Mon, Feb 3, 2020 at 12:07 AM Richard Guo wrote: > > Hi Jesse, > > Thanks for reviewing these two patches. I enjoyed it! > > On Sat, Jan 25, 2020 at 6:52 AM Jesse Zhang wrote: >> >> >> I glanced over both patches. Just the opposite, I have a hunch that v3

Re: Resolving the python 2 -> python 3 mess

2020-02-17 Thread Jesse Zhang
Hi Tom, I really like the "stub .so" idea, but feel pretty uncomfortable for the "transparent" upgrade. Response inlined. On Mon, Feb 17, 2020 at 8:49 AM Tom Lane wrote: > > 2. On platforms where Python 2.x is no longer supported, transparently > map plpythonu and plpython2u to plpython3u. "Tra

Re: Use compiler intrinsics for bit ops in hash

2020-03-02 Thread Jesse Zhang
Hi David, On Wed, Feb 26, 2020 at 9:56 PM David Fetter wrote: > > On Wed, Feb 26, 2020 at 09:12:24AM +0100, David Fetter wrote: > > On Fri, Jan 31, 2020 at 04:59:18PM +0100, David Fetter wrote: > > > On Wed, Jan 15, 2020 at 03:45:12PM -0800, Jesse Zhang wrote: > > &g

Re: Use compiler intrinsics for bit ops in hash

2020-03-08 Thread Jesse Zhang
Hi John, Oops this email has been sitting in my outbox for 3 days... On Wed, Mar 4, 2020 at 1:46 AM John Naylor wrote: > On Tue, Mar 3, 2020 at 4:46 AM Jesse Zhang wrote: > > I've quickly put together a PoC patch on top of yours, which > > re-implements ceil_log2 using

Re: Use compiler intrinsics for bit ops in hash

2020-03-08 Thread Jesse Zhang
Hi David, On Sun, Mar 8, 2020 at 11:34 AM David Fetter wrote: > > On Mon, Mar 02, 2020 at 12:45:21PM -0800, Jesse Zhang wrote: > > Hi David, > > Per discussion on IRC with Andrew (RhodiumToad) Gierth: > > The runtime detection means there's always an indirect call ov

Re: C testing for Postgres

2019-06-28 Thread Jesse Zhang
On Fri, Jun 28, 2019 at 10:37 AM Adam Berlin wrote: > > If we were to use this tool, would the community want to vendor the > framework in the Postgres repository, or keep it in a separate > repository that produces a versioned shared library? > If the library is going to actively evolve, we shou

Re: Partition prune with stable Expr

2020-09-27 Thread Jesse Zhang
On Sun, Sep 27, 2020 at 7:52 PM Andy Fan wrote: > > > On Mon, Sep 28, 2020 at 9:15 AM Tom Lane wrote: >> >> Andy Fan writes: >> > Well, that's very interesting. Specific to my user case, >> > SELECT * FROM p WHERE pkey = to_date('2018-12-13', '-mm-dd)'; >> > p has 1500+ partitions and planning

Re: Residual cpluspluscheck issues

2020-09-30 Thread Jesse Zhang
Hi Tom, So it's been 17 months since you sent this email, so I'm not sure that nothing has happened (off list or in the code base), but... On Sun, Jun 2, 2019 at 9:53 AM Tom Lane wrote: > * On FreeBSD 12, I get > > /home/tgl/pgsql/src/include/utils/hashutils.h:23:23: warning: 'register' > storag