Re: [HACKERS] Cached plans and statement generalization

2021-04-26 Thread Юрий Соколов
вс, 1 мар. 2020 г. в 22:26, Tom Lane : > > Konstantin Knizhnik writes: > > [ autoprepare-extended-4.patch ] > > The cfbot is showing that this doesn't apply anymore; there's > some doubtless-trivial conflict in prepare.c. > > However ... TBH I've been skeptical of this whole proposal from the > be

Re: [HACKERS] Cached plans and statement generalization

2020-07-01 Thread Daniel Gustafsson
> On 1 Mar 2020, at 20:26, Tom Lane wrote: > In short, I really think we ought to reject this patch and move on. > Maybe it could be resurrected sometime in the future when we have a > better handle on when to cache plans and when not. > > If you want to press forward with it anyway, certainly t

Re: [HACKERS] Cached plans and statement generalization

2020-03-01 Thread Tom Lane
Konstantin Knizhnik writes: > [ autoprepare-extended-4.patch ] The cfbot is showing that this doesn't apply anymore; there's some doubtless-trivial conflict in prepare.c. However ... TBH I've been skeptical of this whole proposal from the beginning, on the grounds that it would probably hurt mor

Re: [HACKERS] Cached plans and statement generalization

2019-12-02 Thread Konstantin Knizhnik
On 01.12.2019 6:26, Michael Paquier wrote: On Thu, Sep 26, 2019 at 10:23:38AM +0300, Konstantin Knizhnik wrote: Sorry, New version of the patch with corrected expected output for rules test is attached. It looks like the documentation is failing to build. Could you fix that? There may be ot

Re: [HACKERS] Cached plans and statement generalization

2019-11-30 Thread Michael Paquier
On Thu, Sep 26, 2019 at 10:23:38AM +0300, Konstantin Knizhnik wrote: > Sorry, > New version of the patch with corrected expected output for rules test is > attached. It looks like the documentation is failing to build. Could you fix that? There may be other issues as well. I have moved the patc

Re: [HACKERS] Cached plans and statement generalization

2019-09-26 Thread Konstantin Knizhnik
On 25.09.2019 23:06, Alvaro Herrera wrote: This patch fails the "rules" tests. Please fix. Sorry, New version of the patch with corrected expected output for rules test is attached. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff

Re: [HACKERS] Cached plans and statement generalization

2019-09-25 Thread Alvaro Herrera
This patch fails the "rules" tests. Please fix. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] Cached plans and statement generalization

2019-08-05 Thread Konstantin Knizhnik
On 01.08.2019 19:56, Konstantin Knizhnik wrote: On 31.07.2019 19:56, Heikki Linnakangas wrote: On 09/07/2019 23:59, Konstantin Knizhnik wrote: Fixed patch version of the path is attached. Much of the patch and the discussion has been around the raw parsing, and guessing which literals ar

Re: [HACKERS] Cached plans and statement generalization

2019-08-02 Thread Daniel Migowski
Am 02.08.2019 um 10:57 schrieb Konstantin Knizhnik: On 02.08.2019 11:25, Daniel Migowski wrote: I have two suggestions however: 1. Please allow to gather information about the autoprepared statements by returning them in pg_prepared_statements view. I would love to monitor usage of them as w

Re: [HACKERS] Cached plans and statement generalization

2019-08-02 Thread Konstantin Knizhnik
On 02.08.2019 11:25, Daniel Migowski wrote: Am 01.08.2019 um 18:56 schrieb Konstantin Knizhnik: I decided to implement your proposal. Much simple version of autoprepare patch is attached. At my computer I got the following results:  pgbench -M simple -S 22495 TPS  pgbench -M extende

Re: [HACKERS] Cached plans and statement generalization

2019-08-02 Thread Daniel Migowski
Am 01.08.2019 um 18:56 schrieb Konstantin Knizhnik: I decided to implement your proposal. Much simple version of autoprepare patch is attached. At my computer I got the following results:  pgbench -M simple -S 22495 TPS  pgbench -M extended -S    47633 TPS  pgbench -M prepared -S    476

Re: [HACKERS] Cached plans and statement generalization

2019-08-01 Thread Konstantin Knizhnik
On 31.07.2019 19:56, Heikki Linnakangas wrote: On 09/07/2019 23:59, Konstantin Knizhnik wrote: Fixed patch version of the path is attached. Much of the patch and the discussion has been around the raw parsing, and guessing which literals are actually parameters that have been inlined into

Re: [HACKERS] Cached plans and statement generalization

2019-07-31 Thread Konstantin Knizhnik
On 31.07.2019 19:56, Heikki Linnakangas wrote: On 09/07/2019 23:59, Konstantin Knizhnik wrote: Fixed patch version of the path is attached. Much of the patch and the discussion has been around the raw parsing, and guessing which literals are actually parameters that have been inlined into

Re: [HACKERS] Cached plans and statement generalization

2019-07-31 Thread Heikki Linnakangas
On 09/07/2019 23:59, Konstantin Knizhnik wrote: Fixed patch version of the path is attached. Much of the patch and the discussion has been around the raw parsing, and guessing which literals are actually parameters that have been inlined into the SQL text. Do we really need to do that, though

Re: [HACKERS] Cached plans and statement generalization

2019-07-09 Thread Konstantin Knizhnik
On 09.07.2019 15:16, Thomas Munro wrote: On Tue, Jul 9, 2019 at 7:32 AM Konstantin Knizhnik wrote: Sorry, are you tests autoprepare-16.patch I have sent in the last e-mail? I can not reproduce the problem with building documentation: + autoprepare_threshold (integer/type>) The problem

Re: [HACKERS] Cached plans and statement generalization

2019-07-09 Thread Thomas Munro
On Tue, Jul 9, 2019 at 7:32 AM Konstantin Knizhnik wrote: > Sorry, are you tests autoprepare-16.patch I have sent in the last e-mail? > I can not reproduce the problem with building documentation: + autoprepare_threshold (integer/type>) The problem is that "integer/type>". (Missing "<").

Re: [HACKERS] Cached plans and statement generalization

2019-07-08 Thread Konstantin Knizhnik
On 08.07.2019 2:23, Thomas Munro wrote: On Tue, Jul 2, 2019 at 3:29 AM Konstantin Knizhnik wrote: Attached please find rebased version of the patch. Also this version can be found in autoprepare branch of this repository https://github.com/postgrespro/postgresql.builtin_pool.git on github.

Re: [HACKERS] Cached plans and statement generalization

2019-07-07 Thread Thomas Munro
On Tue, Jul 2, 2019 at 3:29 AM Konstantin Knizhnik wrote: > Attached please find rebased version of the patch. > Also this version can be found in autoprepare branch of this repository > https://github.com/postgrespro/postgresql.builtin_pool.git > on github. Thanks. I haven't looked at the code

Re: [HACKERS] Cached plans and statement generalization

2019-07-01 Thread Konstantin Knizhnik
On 01.07.2019 12:51, Thomas Munro wrote: On Wed, Apr 10, 2019 at 12:52 AM Konstantin Knizhnik wrote: New version of the patching disabling autoprepare for rules and handling planner error. Hi Konstantin, This doesn't apply. Could we please have a fresh rebase for the new Commitfest? Thanks

Re: [HACKERS] Cached plans and statement generalization

2019-07-01 Thread Thomas Munro
On Wed, Apr 10, 2019 at 12:52 AM Konstantin Knizhnik wrote: > New version of the patching disabling autoprepare for rules and handling > planner error. Hi Konstantin, This doesn't apply. Could we please have a fresh rebase for the new Commitfest? Thanks, -- Thomas Munro https://enterprisedb.c

Re: [HACKERS] Cached plans and statement generalization

2019-04-09 Thread Konstantin Knizhnik
New version of the patching disabling autoprepare for rules and handling planner error. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/doc/src/sgml/autoprepare.sgml b/doc/src/sgml/autoprepare.sgml new file mode 100644 index 00

Re: [HACKERS] Cached plans and statement generalization

2019-04-03 Thread Konstantin Knizhnik
New version of the patch with fixed error of autopreparing CTE queries. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/doc/src/sgml/autoprepare.sgml b/doc/src/sgml/autoprepare.sgml new file mode 100644 index 000..b3309bd ---

Re: [HACKERS] Cached plans and statement generalization

2019-03-19 Thread Konstantin Knizhnik
Thank you very much for the review! On 19.03.2019 5:56, Yamaji, Ryo wrote: On Tue, Jan 29, 2019 at 10:46 AM, Konstantin Knizhnik wrote: Rebased version of the patch is attached. I'm sorry for the late review. I confirmed behavior of autoprepare-12.patch. It is summarized below. ・parameter Exp

RE: [HACKERS] Cached plans and statement generalization

2019-03-18 Thread Yamaji, Ryo
On Tue, Jan 29, 2019 at 10:46 AM, Konstantin Knizhnik wrote: > Rebased version of the patch is attached. I'm sorry for the late review. I confirmed behavior of autoprepare-12.patch. It is summarized below. ・parameter Expected behavior was shown according to the set value. However, I think that i

RE: [HACKERS] Cached plans and statement generalization

2019-01-29 Thread Nagaura, Ryohei
Hi, On Mon, Jan 28, 2019 at 10:46 PM, Konstantin Knizhnik wrote: > Rebased version of the patch is attached. Thank you for your quick rebase. > This files are just output of test execution and it is not possible to expect > lack of > trailing spaces in output of test scripts execution. I underst

Re: [HACKERS] Cached plans and statement generalization

2019-01-29 Thread Konstantin Knizhnik
On 29.01.2019 4:38, Nagaura, Ryohei wrote: Hi, Although I became your reviewer, it seems to be difficult to feedback in this CF. I continue to review, so would you update your patch please? Until then I review your current patch. There is one question. date_1.out which maybe is copy of date.

RE: [HACKERS] Cached plans and statement generalization

2019-01-28 Thread Nagaura, Ryohei
Hi, Although I became your reviewer, it seems to be difficult to feedback in this CF. I continue to review, so would you update your patch please? Until then I review your current patch. There is one question. date_1.out which maybe is copy of date.out includes trailing space and gaps of indent

Re: [HACKERS] Cached plans and statement generalization

2018-11-30 Thread Dmitry Dolgov
> On Fri, Nov 30, 2018 at 3:06 AM Yamaji, Ryo wrote: > > On Fri, Nov 30, 2018 at 3:48 AM, Dmitry Dolgov wrote: > > > Hi, > > > > Thanks for reviewing. Since another CF is about to end, maybe you can > > post the full review feedback? > > Since I had been busy with my private work, I couldn't revie

RE: [HACKERS] Cached plans and statement generalization

2018-11-29 Thread Yamaji, Ryo
On Fri, Nov 30, 2018 at 3:48 AM, Dmitry Dolgov wrote: > Hi, > > Thanks for reviewing. Since another CF is about to end, maybe you can > post the full review feedback? Since I had been busy with my private work, I couldn't review. I want to review next commit fest. I am sorry I postponed many tim

Re: [HACKERS] Cached plans and statement generalization

2018-11-29 Thread Dmitry Dolgov
> On Fri, Sep 28, 2018 at 10:46 AM Yamaji, Ryo > wrote: > > On Tuesday, August 7, 2018 at 0:36 AM, Konstantin Knizhnik wrote: > > > I have registered the patch for next commitfest. > > For some reasons it doesn't find the latest autoprepare-10.patch and still > > refer to autoprepare-6.patch as t

RE: [HACKERS] Cached plans and statement generalization

2018-09-28 Thread Yamaji, Ryo
On Tuesday, August 7, 2018 at 0:36 AM, Konstantin Knizhnik wrote: > I have registered the patch for next commitfest. > For some reasons it doesn't find the latest autoprepare-10.patch and still > refer to autoprepare-6.patch as the latest attachement. I'm sorry for the late reply. I'm currently r

Re: [HACKERS] Cached plans and statement generalization

2018-08-24 Thread Konstantin Knizhnik
On 22.08.2018 07:54, Yamaji, Ryo wrote: On Tuesday, August 7, 2018 at 0:36 AM, Konstantin Knizhnik wrote: I have registered the patch for next commitfest. For some reasons it doesn't find the latest autoprepare-10.patch and still refer to autoprepare-6.patch as the latest attachement. I am s

RE: [HACKERS] Cached plans and statement generalization

2018-08-21 Thread Yamaji, Ryo
On Tuesday, August 7, 2018 at 0:36 AM, Konstantin Knizhnik wrote: > I have registered the patch for next commitfest. > For some reasons it doesn't find the latest autoprepare-10.patch and still > refer to autoprepare-6.patch as the latest attachement. I am sorry for the long delay in my response

Re: [HACKERS] Cached plans and statement generalization

2018-08-07 Thread Konstantin Knizhnik
On 07.08.2018 13:02, Yamaji, Ryo wrote: I want to confirm one point. If I will have reviewed the autoprepare patch, then are you ready to register the patch at commit fest in the near future? I fear that autoprepare patch do not registered at commit fest in the future (for example, you are so

RE: [HACKERS] Cached plans and statement generalization

2018-08-07 Thread Yamaji, Ryo
> -Original Message- > From: Konstantin Knizhnik [mailto:k.knizh...@postgrespro.ru] > Sent: Friday, August 3, 2018 7:02 AM > To: Yamaji, Ryo/山地 亮 > Cc: PostgreSQL mailing lists > Subject: Re: [HACKERS] Cached plans and statement generalization > > Th

Re: [HACKERS] Cached plans and statement generalization

2018-08-02 Thread Konstantin Knizhnik
On 02.08.2018 08:25, Yamaji, Ryo wrote: -Original Message- From: Konstantin Knizhnik [mailto:k.knizh...@postgrespro.ru] Sent: Wednesday, August 1, 2018 4:53 PM To: Yamaji, Ryo/山地 亮 Cc: PostgreSQL mailing lists Subject: Re: [HACKERS] Cached plans and statement generalization I failed

RE: [HACKERS] Cached plans and statement generalization

2018-08-01 Thread Yamaji, Ryo
> -Original Message- > From: Konstantin Knizhnik [mailto:k.knizh...@postgrespro.ru] > Sent: Wednesday, August 1, 2018 4:53 PM > To: Yamaji, Ryo/山地 亮 > Cc: PostgreSQL mailing lists > Subject: Re: [HACKERS] Cached plans and statement generalization > > I failed

Re: [HACKERS] Cached plans and statement generalization

2018-08-01 Thread Konstantin Knizhnik
On 31.07.2018 12:12, Yamaji, Ryo wrote: 3. I confirmed the transition of the amount of the memory when it tried to prepare query of the number that exceeded the value specified for autoprepare_limit. [autoprepare_limit=1 and execute 10 different queries] plan cache context: 1032 used

Re: [HACKERS] Cached plans and statement generalization

2018-08-01 Thread Konstantin Knizhnik
; PostgreSQL mailing lists ; Tsunakawa, Takayuki/綱川 貴之 Subject: Re: [HACKERS] Cached plans and statement generalization Thank you very much for reporting the problem. Rebased version of the patch is attached. Hi Konstantin. I think that this patch excel very much. Because the customer of our company has

Re: [HACKERS] Cached plans and statement generalization

2018-07-31 Thread Konstantin Knizhnik
Subject: Re: [HACKERS] Cached plans and statement generalization Thank you very much for reporting the problem. Rebased version of the patch is attached. Hi Konstantin. I think that this patch excel very much. Because the customer of our company has the demand that migrates from other DB to PostgreSQL

RE: [HACKERS] Cached plans and statement generalization

2018-07-31 Thread Yamaji, Ryo
> -Original Message- > From: Konstantin Knizhnik [mailto:k.knizh...@postgrespro.ru] > Sent: Friday, January 12, 2018 9:53 PM > To: Thomas Munro ; Stephen Frost > > Cc: Michael Paquier ; PostgreSQL mailing > lists ; Tsunakawa, Takayuki/綱川 貴之 > > Subject: Re:

Re: Re: Re: [HACKERS] Cached plans and statement generalization

2018-03-06 Thread David Steele
On 3/2/18 9:26 AM, David Steele wrote: > On 1/12/18 7:53 AM, Konstantin Knizhnik wrote: >> >> >> On 12.01.2018 03:40, Thomas Munro wrote: >>> On Sun, Jan 7, 2018 at 11:51 AM, Stephen Frost >>> wrote: * Konstantin Knizhnik (k.knizh...@postgrespro.ru) wrote: > Updated version of the patch i

Re: Re: [HACKERS] Cached plans and statement generalization

2018-03-02 Thread David Steele
Hi Konstantin, On 1/12/18 7:53 AM, Konstantin Knizhnik wrote: > > > On 12.01.2018 03:40, Thomas Munro wrote: >> On Sun, Jan 7, 2018 at 11:51 AM, Stephen Frost >> wrote: >>> * Konstantin Knizhnik (k.knizh...@postgrespro.ru) wrote: Updated version of the patch is attached. >>> This patch app

Re: [HACKERS] Cached plans and statement generalization

2018-01-12 Thread Konstantin Knizhnik
On 12.01.2018 03:40, Thomas Munro wrote: On Sun, Jan 7, 2018 at 11:51 AM, Stephen Frost wrote: * Konstantin Knizhnik (k.knizh...@postgrespro.ru) wrote: Updated version of the patch is attached. This patch appears to apply with just a bit of fuzz and make check passes, so I'm not sure why th

Re: [HACKERS] Cached plans and statement generalization

2018-01-11 Thread Thomas Munro
On Sun, Jan 7, 2018 at 11:51 AM, Stephen Frost wrote: > * Konstantin Knizhnik (k.knizh...@postgrespro.ru) wrote: >> Updated version of the patch is attached. > > This patch appears to apply with just a bit of fuzz and make check > passes, so I'm not sure why this is currently marked as 'Waiting fo

Re: [HACKERS] Cached plans and statement generalization

2018-01-06 Thread Stephen Frost
Greetings, * Konstantin Knizhnik (k.knizh...@postgrespro.ru) wrote: > On 30.11.2017 04:59, Michael Paquier wrote: > >On Wed, Sep 13, 2017 at 2:11 AM, Konstantin Knizhnik > > wrote: > >>One more patch passing all regression tests with autoprepare_threshold=1. > >>I still do not think that it should

Re: [HACKERS] Cached plans and statement generalization

2017-12-04 Thread Konstantin Knizhnik
On 30.11.2017 04:59, Michael Paquier wrote: On Wed, Sep 13, 2017 at 2:11 AM, Konstantin Knizhnik wrote: One more patch passing all regression tests with autoprepare_threshold=1. I still do not think that it should be switch on by default... This patch does not apply, and did not get any revi

Re: [HACKERS] Cached plans and statement generalization

2017-11-29 Thread Michael Paquier
On Thu, Nov 30, 2017 at 11:07 AM, Tsunakawa, Takayuki wrote: > From: Michael Paquier [mailto:michael.paqu...@gmail.com] >> This patch does not apply, and did not get any reviews. So I am moving it >> to next CF with waiting on author as status. Please provide a rebased >> version. >> Tsunakawa-sa

RE: [HACKERS] Cached plans and statement generalization

2017-11-29 Thread Tsunakawa, Takayuki
From: Michael Paquier [mailto:michael.paqu...@gmail.com] > This patch does not apply, and did not get any reviews. So I am moving it > to next CF with waiting on author as status. Please provide a rebased version. > Tsunakawa-san, you are listed as a reviewer of this patch. If you are not > plannin

Re: [HACKERS] Cached plans and statement generalization

2017-11-29 Thread Michael Paquier
On Wed, Sep 13, 2017 at 2:11 AM, Konstantin Knizhnik wrote: > One more patch passing all regression tests with autoprepare_threshold=1. > I still do not think that it should be switch on by default... This patch does not apply, and did not get any reviews. So I am moving it to next CF with waitin