Re: MERGE SQL statement for PG12

2019-01-31 Thread Alvaro Herrera
I'm going to close this patch as returned with feedback, since it's had plenty and it's pretty clear that it will take some time to address it. Pavan is welcome to resubmit when he has a new version. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Suppor

Re: MERGE SQL statement for PG12

2019-01-15 Thread Tom Lane
Robert Haas writes: > You should redesign this whole representation so that you just pass > the whole query through to the optimizer without any structural > change. Just as we do for other statements, you need to do the basic > transformation stuff like looking up relation OIDs: that has to do >

Re: MERGE SQL statement for PG12

2019-01-15 Thread Andres Freund
Hi, On 2019-01-15 14:05:25 -0500, Robert Haas wrote: > On Mon, Jan 14, 2019 at 1:37 AM Pavan Deolasee > wrote: > > Can you please help me understand what's fundamentally wrong with > > the approach and more importantly, can you please explain what would > > the the architecturally sound way to d

Re: MERGE SQL statement for PG12

2019-01-15 Thread Robert Haas
On Mon, Jan 14, 2019 at 1:37 AM Pavan Deolasee wrote: > Can you please help me understand what's fundamentally wrong with the > approach and more importantly, can you please explain what would the the > architecturally sound way to do this? The same also applies to the executor > side where the

Re: MERGE SQL statement for PG12

2019-01-14 Thread Simon Riggs
On Mon, 14 Jan 2019 at 15:45, Tomas Vondra wrote: > > > On 1/11/19 12:26 AM, Peter Geoghegan wrote: > > On Thu, Jan 10, 2019 at 1:15 PM Robert Haas > wrote: > >> I feel like there has been some other thread where this was discussed, > >> but I can't find it right now. I think that the "query co

Re: MERGE SQL statement for PG12

2019-01-14 Thread Tomas Vondra
On 1/11/19 12:26 AM, Peter Geoghegan wrote: > On Thu, Jan 10, 2019 at 1:15 PM Robert Haas wrote: >> I feel like there has been some other thread where this was discussed, >> but I can't find it right now. I think that the "query construction" >> logic in transformMergeStmt is fundamentally the

Re: MERGE SQL statement for PG12

2019-01-13 Thread Pavan Deolasee
Hi Robert, Thanks for the comments. On Fri, Jan 11, 2019 at 2:45 AM Robert Haas wrote: > > I feel like there has been some other thread where this was discussed, > but I can't find it right now. I think that the "query construction" > logic in transformMergeStmt is fundamentally the wrong way

Re: MERGE SQL statement for PG12

2019-01-10 Thread Peter Geoghegan
On Thu, Jan 10, 2019 at 1:15 PM Robert Haas wrote: > I feel like there has been some other thread where this was discussed, > but I can't find it right now. I think that the "query construction" > logic in transformMergeStmt is fundamentally the wrong way to do this. > I think several others have

Re: MERGE SQL statement for PG12

2019-01-10 Thread Robert Haas
On Thu, Jan 3, 2019 at 2:11 AM Pavan Deolasee wrote: > On Tue, Nov 27, 2018 at 4:48 PM Pavan Deolasee > wrote: >> In the meanwhile, I am posting a rebased version. > > Another rebase on the current master. I feel like there has been some other thread where this was discussed, but I can't find

Re: MERGE SQL statement for PG12

2019-01-09 Thread Mi Tar
Hi! Looking at the commitfest as a novice contributor I was searching for patches to review without any reviewers set. And because I just spend some time and made a patch improving how REFRESH MATERIALIZED VIEW CONCURRENTLY works (does INSERTs/UPDATEs/DELETEs instead of just DELETEs/INSERTs) wh

Re: MERGE SQL statement for PG12

2018-11-27 Thread Amit Langote
Hi Pavan, Thanks for continuing to work on this. On 2018/11/27 20:18, Pavan Deolasee wrote: > Ok. I will try that approach again. In the meanwhile, I am posting a > rebased version. There had been quite a lot changes on partitioning side > and that caused non-trivial conflicts. I noticed a couple

Re: MERGE SQL statement for PG12

2018-11-22 Thread Tomas Vondra
On 11/22/18 7:44 AM, Pavan Deolasee wrote: Hi Tomas, Sorry for a delayed response. On Mon, Oct 29, 2018 at 4:59 PM Tomas Vondra mailto:tomas.von...@2ndquadrant.com>> wrote: Hi Pavan, On 10/29/2018 10:23 AM, Pavan Deolasee wrote: > > ... > > Thanks for keeping an

Re: MERGE SQL statement for PG12

2018-11-21 Thread Pavan Deolasee
Hi Tomas, Sorry for a delayed response. On Mon, Oct 29, 2018 at 4:59 PM Tomas Vondra wrote: > Hi Pavan, > > On 10/29/2018 10:23 AM, Pavan Deolasee wrote: > > > > ... > > > > Thanks for keeping an eye on the patch. I've rebased the patch > > against the current master. A new version is attached.

Re: MERGE SQL statement for PG12

2018-10-29 Thread Tomas Vondra
Hi Pavan, On 10/29/2018 10:23 AM, Pavan Deolasee wrote: ... Thanks for keeping an eye on the patch. I've rebased the patch against the current master. A new version is attached. Thanks, Pavan It's good to see the patch moving forward. What are your thoughts regarding things that need to b

Re: MERGE SQL statement for PG12

2018-09-29 Thread Jaime Casanova
On Mon, 24 Sep 2018 at 05:15, Pavan Deolasee wrote: > > A new version rebased against the current master is attached. > Hi Pavan, A day after you posted this patch commit 29c94e03c7d05d2b29afa1de32795ce178531246 removed ExecStoreTuple. I'm right in believe that the change in src/backend/executor

Re: MERGE SQL statement for PG12

2018-09-03 Thread Jaime Casanova
On Tue, 4 Sep 2018 at 00:01, Pavan Deolasee wrote: > > I've rebased the patch against the current master. The patch hasn't changed > much since the last time. > Hi Pavan, I had this crash when running sqlsmith against the previous version of this patch and just confirmed it still crash with thi

Re: MERGE SQL statement for PG12

2018-06-25 Thread Alvaro Herrera
On 2018-Jun-19, Pavan Deolasee wrote: > Hello, > > I would like to resubmit the MERGE patch for PG12. The past discussions > about the patch can be found here [1] [2]. Hello. A very minor thing, please see commit 15a8f8caad14 and the discussion that led to it. Thanks -- Álvaro Herrera

Re: MERGE SQL statement for PG12

2018-06-19 Thread Peter Geoghegan
On Tue, Jun 19, 2018 at 4:06 AM, Pavan Deolasee wrote: > I would like to resubmit the MERGE patch for PG12. The past discussions > about the patch can be found here [1] [2]. FWIW, I'm really glad that you're going to work on this for v12. -- Peter Geoghegan

Re: MERGE SQL statement for PG12

2018-06-19 Thread Pavan Deolasee
On Tue, Jun 19, 2018 at 4:41 PM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > It's already in the commitfest, although I think it's almost certain to be > pushed out to the September CF. I'll add this email to the existing item. > > Thanks Andrew; I was gonna do that once the emai

Re: MERGE SQL statement for PG12

2018-06-19 Thread Andrew Dunstan
On 06/19/2018 07:06 AM, Pavan Deolasee wrote: Hello, I would like to resubmit the MERGE patch for PG12. The past discussions about the patch can be found here [1] [2]. The patch is rebased on the current master. But otherwise I haven't done any further work on it since it was punted from