Re: New statistics for tuning WAL buffer size

2020-10-05 Thread Masahiro Ikeda
Hi, I think it's better to add other WAL statistics to the pg_stat_wal view. I'm thinking to add the following statistics. Please let me know your thoughts. 1. Basic wal statistics * wal_records: Total number of WAL records generated * wal_fpi: Total number of WAL full page images generated

Re: Logical Replication - detail message with names of missing columns

2020-10-05 Thread Bharath Rupireddy
Thanks Amit for the review comments. On Mon, Oct 5, 2020 at 9:39 AM Amit Kapila wrote: > > Few comments: > == > 1. > + /* Report error with names of the missing localrel column(s). */ > + if (!bms_is_empty(missingatts)) > + { > + StringInfoData missingattsbuf; > + intmissingattcnt

Re: libpq compression

2020-10-05 Thread Andrey M. Borodin
> 26 марта 2019 г., в 19:46, Konstantin Knizhnik > написал(а): > > Version of the patch correctly working when no compression algorithm are > avaiable. Thanks for this work, Konstantin. PFA rebased version of this patch. This compression seems very important to reduce network-induced replic

Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module

2020-10-05 Thread Bharath Rupireddy
On Tue, Oct 6, 2020 at 11:20 AM Fujii Masao wrote: > > >> > >> Probably we can also replace sigHupHandler() in syslogger.c with > >> SignalHandlerForConfigReload()? This would be separate patch, though. > >> > > > > +1 to replace sigHupHandler() with SignalHandlerForConfigReload() as > > the latch

Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module

2020-10-05 Thread Michael Paquier
On Mon, Oct 05, 2020 at 11:34:05PM +0900, Fujii Masao wrote: > ISTM that we can also replace StartupProcSigHupHandler() in startup.c > with SignalHandlerForConfigReload() by making the startup process use > the general shared latch instead of its own one. POC patch attached. > Thought? That looks

Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module

2020-10-05 Thread Fujii Masao
On 2020/10/06 1:18, Bharath Rupireddy wrote: On Mon, Oct 5, 2020 at 8:04 PM Fujii Masao wrote: On 2020/10/05 19:45, Bharath Rupireddy wrote: Hi, Autoprewarm module is using it's own SIGHUP(apw_sigterm_handler, got_sigterm) and SIGTERM(apw_sighup_handler, got_sighup) handlers which are si

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Michael Paquier
On Mon, Oct 05, 2020 at 11:23:50PM -0400, Bruce Momjian wrote: > On Tue, Oct 6, 2020 at 11:11:27AM +0800, Julien Rouhaud wrote: >> Maybe we could add a new hook for only queryid computation, and add a >> GUC to let people choose between no queryid computed, core computation >> (current pg_stat_sta

Re: fixing old_snapshot_threshold's time->xid mapping

2020-10-05 Thread Thomas Munro
On Fri, Sep 25, 2020 at 2:00 PM Michael Paquier wrote: > On Thu, Sep 24, 2020 at 03:46:14PM -0400, Robert Haas wrote: > > Committed. > > Cool, thanks. +1 > > Thomas, with respect to your part of this patch set, I wonder if we > > can make the functions that you're using to write tests safe enoug

Re: [HACKERS] Custom compression methods

2020-10-05 Thread Dilip Kumar
On Mon, Oct 5, 2020 at 9:34 PM Tomas Vondra wrote: > > On Mon, Oct 05, 2020 at 07:57:41PM +0530, Dilip Kumar wrote: > >On Mon, Oct 5, 2020 at 5:53 PM Tomas Vondra > > wrote: > >> > >> On Mon, Oct 05, 2020 at 11:17:28AM +0530, Dilip Kumar wrote: > >> >On Mon, Oct 5, 2020 at 3:37 AM Tomas Vondra > >

Re: Parallel Inserts in CREATE TABLE AS

2020-10-05 Thread Amit Kapila
On Mon, Sep 28, 2020 at 3:58 PM Bharath Rupireddy wrote: > > Thanks Andres for the comments. > > On Thu, Sep 24, 2020 at 8:11 AM Andres Freund wrote: > > > > > The design: > > > > I think it'd be good if you could explain a bit more why you think this > > safe to do in the way you have done it. >

Re: [HACKERS] logical decoding of two-phase transactions

2020-10-05 Thread Peter Smith
Hello Ajin. I have done some review of the v6 patches. I had some difficulty replying my review comments to the OSS list, so I am putting them as an attachment here. Kind Regards, Peter Smith Fujitsu Australia Hello Ajin. I have gone through the v6 patch changes and have a list of review commen

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Michael Paquier
On Mon, Oct 05, 2020 at 05:24:06PM -0400, Bruce Momjian wrote: > (Also, did we decide _not_ to make the pg_stat_statements queryid > always a positive value?) This specific point has been discussed a couple of years ago, please see cff440d and its related thread: https://www.postgresql.org/message

Re: 回复:how to create index concurrently on partitioned table

2020-10-05 Thread Michael Paquier
On Mon, Oct 05, 2020 at 10:07:33PM -0500, Justin Pryzby wrote: > Honestly, I think you're over-thinking and over-engineering indisclustered. > > If "clusteredness" was something we offered to maintain across DML, I think > that might be important to provide stronger guarantees. As it is now, I do

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-05 Thread Masahiko Sawada
On Mon, 5 Oct 2020 at 17:50, Amit Kapila wrote: > > On Mon, Oct 5, 2020 at 1:26 PM Masahiko Sawada > wrote: > > > > On Sat, 3 Oct 2020 at 16:55, Amit Kapila wrote: > > > > > > On Sat, Oct 3, 2020 at 9:26 AM Masahiko Sawada > > > wrote: > > > > > > > > When we discussed this before, I was thinki

Re: Logical Replication - detail message with names of missing columns

2020-10-05 Thread Amit Kapila
On Mon, Oct 5, 2020 at 8:00 PM Bharath Rupireddy wrote: > > Thanks Amit for the review comments. I will post an updated patch soon. > > On Mon, Oct 5, 2020 at 9:39 AM Amit Kapila wrote: > > > > 6. I think we should add one test case for this in the existing > > regression test (src/test/subscript

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Bruce Momjian
On Tue, Oct 6, 2020 at 11:11:27AM +0800, Julien Rouhaud wrote: > > I do think the queryid has to display independent of pg_stat_statements, > > because I can see people using queryid for log file and pg_stat_activity > > comparisons. I also think the ability to have queryid accessible is an > > i

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Julien Rouhaud
On Tue, Oct 6, 2020 at 10:18 AM Bruce Momjian wrote: > > On Mon, Oct 5, 2020 at 07:58:42PM -0300, Álvaro Herrera wrote: > > On 2020-Oct-05, Tom Lane wrote: > > > > > FWIW, I think this proposal is a mess. I was willing to hold my nose > > > and have a queryId field in the internal Query struct w

Re: 回复:how to create index concurrently on partitioned table

2020-10-05 Thread Justin Pryzby
On Tue, Oct 06, 2020 at 11:42:55AM +0900, Michael Paquier wrote: > On Mon, Oct 05, 2020 at 03:08:32PM -0500, Justin Pryzby wrote: > > It means that we might do N catalog updates for a partition heirarchy > > that's N > > levels deep. Normally, N=2, and we'd clear indisclustered for the index as >

Re: 回复:how to create index concurrently on partitioned table

2020-10-05 Thread Michael Paquier
On Mon, Oct 05, 2020 at 03:08:32PM -0500, Justin Pryzby wrote: > It means that we might do N catalog updates for a partition heirarchy that's N > levels deep. Normally, N=2, and we'd clear indisclustered for the index as > well as its parent. This is not essential, though. Hmm. I got to think m

Re: enable_incremental_sort changes query behavior

2020-10-05 Thread James Coleman
On Mon, Oct 5, 2020 at 11:33 AM James Coleman wrote: > > On Sun, Oct 4, 2020 at 9:40 PM James Coleman wrote: > > > > On Sat, Oct 3, 2020 at 10:10 PM James Coleman wrote: > > > > > > On Sat, Oct 3, 2020 at 5:44 PM Tomas Vondra > > > wrote: > > > > > > > > On Sat, Oct 03, 2020 at 10:50:06AM -0400

Re: Improving connection scalability: GetSnapshotData()

2020-10-05 Thread Andres Freund
Hi, On 2020-10-01 19:21:14 -0400, Andrew Dunstan wrote: > On 10/1/20 4:22 PM, Andres Freund wrote: > > # Note: on Windows, IPC::Run seems to convert \r\n to \n in program > > output > > # if we're using native Perl, but not if we're using MSys Perl. So do > > it > > # by hand in the

Re: "cert" + clientcert=verify-ca in pg_hba.conf?

2020-10-05 Thread Kyotaro Horiguchi
At Mon, 5 Oct 2020 16:07:50 -0400, Bruce Momjian wrote in > > Yes, that is the version I was going to apply. I will do it today. > > Thanks. > > Patch applied to master, and the first paragraph diff was applied to PG > 12-13 too. Thanks! regards. -- Kyotaro Horiguchi NTT Open Source Softwa

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Bruce Momjian
On Mon, Oct 5, 2020 at 07:58:42PM -0300, Álvaro Herrera wrote: > On 2020-Oct-05, Tom Lane wrote: > > > FWIW, I think this proposal is a mess. I was willing to hold my nose > > and have a queryId field in the internal Query struct without any solid > > consensus about what its semantics are and w

Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away

2020-10-05 Thread Fujii Masao
On 2020/10/05 20:32, Bharath Rupireddy wrote: On Mon, Oct 5, 2020 at 9:45 AM Fujii Masao wrote: I see the errmsg() with plain texts in other places in the code base as well. Is it that we look at the error message and if it is a plain text(without database objects or table data), we decid

Recent failures on buildfarm member hornet

2020-10-05 Thread Tom Lane
hornet has failed its last five runs with 2020-10-05 22:45:42.784 UTC [34734498:40] pg_regress/create_aggregate LOG: statement: create aggregate my_percentile_disc(float8 ORDER BY anyelement) ( stype = internal, sfunc = ordered_set_transition, finalfunc = percentile

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Alvaro Herrera
On 2020-Oct-05, Tom Lane wrote: > FWIW, I think this proposal is a mess. I was willing to hold my nose > and have a queryId field in the internal Query struct without any solid > consensus about what its semantics are and which extensions get to use it. > Exposing it to end users seems like a bri

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Tom Lane
Bruce Momjian writes: > I would like to apply this patch (I know it has been in the commitfest > since July 2019), but I have some questions about the user API. Does it > make sense to have a column in pg_stat_actvity and an option in > log_line_prefix that will be empty unless pg_stat_statements

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-10-05 Thread Bruce Momjian
On Wed, Aug 19, 2020 at 04:19:30PM +0200, Julien Rouhaud wrote: > Similarly to other fields in pg_stat_activity, only the queryid from the top > level statements are exposed, and if the backends status isn't active then the > queryid from the last executed statements is displayed. > > Also add a %

Re: [PATCH] Automatic HASH and LIST partition creation

2020-10-05 Thread Pavel Borisov
Hi, hackers! I added some extra tests for different cases of use of automatic partition creation. v3-0002 can be applied on top of the original v2 patch for correct work with some corner cases with constraints included in this test. As for immediate/deferred I think that now only available now is

Re: 回复:how to create index concurrently on partitioned table

2020-10-05 Thread Justin Pryzby
On Mon, Oct 05, 2020 at 05:46:27PM +0900, Michael Paquier wrote: > On Sat, Sep 26, 2020 at 02:56:55PM -0500, Justin Pryzby wrote: > > Also, if a partitioned index is clustered, when we clear indisclustered for > > other indexes, should we also propogate that to their parent indexes, if > > any ? >

Re: "cert" + clientcert=verify-ca in pg_hba.conf?

2020-10-05 Thread Bruce Momjian
On Mon, Oct 5, 2020 at 02:02:34PM -0400, Bruce Momjian wrote: > On Mon, Oct 5, 2020 at 10:25:08AM +0900, Kyotaro Horiguchi wrote: > > > > >From 2978479ada887284eae0ed36c8acf29f1a002feb Mon Sep 17 00:00:00 2001 > > > > From: Kyotaro Horiguchi > > > > Date: Tue, 21 Jul 2020 23:01:27 +0900 > > > >

Re: Probable documentation errors or improvements

2020-10-05 Thread Justin Pryzby
On Fri, Sep 25, 2020 at 09:30:00AM -0500, Justin Pryzby wrote: > Split one patch about text search, added another one (sequences), added some > info to commit messages, and added here. > https://commitfest.postgresql.org/30/2744/ Added an additional patch regarding spaces between function argument

Re: Partitionwise join fails under GEQO

2020-10-05 Thread Tom Lane
Ashutosh Bapat writes: > On Mon, Oct 5, 2020 at 6:47 AM Tom Lane wrote: >> Now that I've seen this, I wonder whether add_child_join_rel_equivalences >> might not be making duplicate EC entries even without GEQO. Is there any >> guarantee that it's not called repeatedly on related join-rel sets?

Re: "cert" + clientcert=verify-ca in pg_hba.conf?

2020-10-05 Thread Bruce Momjian
On Mon, Oct 5, 2020 at 10:25:08AM +0900, Kyotaro Horiguchi wrote: > > > >From 2978479ada887284eae0ed36c8acf29f1a002feb Mon Sep 17 00:00:00 2001 > > > From: Kyotaro Horiguchi > > > Date: Tue, 21 Jul 2020 23:01:27 +0900 > > > Subject: [PATCH v2] Allow directory name for GUC ssl_crl_file and > > >

Re: Buglets in equivclass.c

2020-10-05 Thread Tom Lane
David Rowley writes: > On Mon, 5 Oct 2020 at 06:29, Tom Lane wrote: >> I'm unsure whether to back-patch either of these. They both seem to be >> just latent bugs so far as the core code is concerned, but the first one >> in particular seems like something that could bite extension code. >> Thoug

Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module

2020-10-05 Thread Bharath Rupireddy
On Mon, Oct 5, 2020 at 8:04 PM Fujii Masao wrote: > > On 2020/10/05 19:45, Bharath Rupireddy wrote: > > Hi, > > > > Autoprewarm module is using it's own SIGHUP(apw_sigterm_handler, > > got_sigterm) and SIGTERM(apw_sighup_handler, got_sighup) handlers which are > > similar to standard signal hand

Re: [HACKERS] Custom compression methods

2020-10-05 Thread Tomas Vondra
On Mon, Oct 05, 2020 at 07:57:41PM +0530, Dilip Kumar wrote: On Mon, Oct 5, 2020 at 5:53 PM Tomas Vondra wrote: On Mon, Oct 05, 2020 at 11:17:28AM +0530, Dilip Kumar wrote: >On Mon, Oct 5, 2020 at 3:37 AM Tomas Vondra > wrote: > >Thanks, Tomas for your feedback. > >> 9) attcompression ... >> >

Re: partition routing layering in nodeModifyTable.c

2020-10-05 Thread Heikki Linnakangas
On 13/07/2020 08:47, Amit Langote wrote: It's been over 11 months since there was any significant commentary on the contents of the patches themselves, so perhaps I should reiterate what the patches are about and why it might still be a good idea to consider them. The thread started with some ve

Re: enable_incremental_sort changes query behavior

2020-10-05 Thread James Coleman
On Sun, Oct 4, 2020 at 9:40 PM James Coleman wrote: > > On Sat, Oct 3, 2020 at 10:10 PM James Coleman wrote: > > > > On Sat, Oct 3, 2020 at 5:44 PM Tomas Vondra > > wrote: > > > > > > On Sat, Oct 03, 2020 at 10:50:06AM -0400, James Coleman wrote: > > > >On Fri, Oct 2, 2020 at 11:16 PM James Cole

Re: Online checksums patch - once again

2020-10-05 Thread Heikki Linnakangas
On 05/10/2020 17:25, Álvaro Herrera wrote: On 2020-Oct-05, Heikki Linnakangas wrote: The code in sendFile() in basebackup.c seems suspicious in that regard. It calls DataChecksumsNeedVerify() once before starting to read the file. Isn't it possible for the checksums flag to change while it's re

Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module

2020-10-05 Thread Fujii Masao
On 2020/10/05 19:45, Bharath Rupireddy wrote: Hi, Autoprewarm module is using it's own SIGHUP(apw_sigterm_handler, got_sigterm) and SIGTERM(apw_sighup_handler, got_sighup) handlers which are similar to standard signal handlers(except for a difference [1]). Isn't it good to remove them and  

Re: Logical Replication - detail message with names of missing columns

2020-10-05 Thread Bharath Rupireddy
Thanks Amit for the review comments. I will post an updated patch soon. On Mon, Oct 5, 2020 at 9:39 AM Amit Kapila wrote: > > 6. I think we should add one test case for this in the existing > regression test (src/test/subscription/t/008_diff_schema). > This patch logs the missing column names me

Re: [HACKERS] Custom compression methods

2020-10-05 Thread Dilip Kumar
On Mon, Oct 5, 2020 at 5:53 PM Tomas Vondra wrote: > > On Mon, Oct 05, 2020 at 11:17:28AM +0530, Dilip Kumar wrote: > >On Mon, Oct 5, 2020 at 3:37 AM Tomas Vondra > > wrote: > > > >Thanks, Tomas for your feedback. > > > >> 9) attcompression ... > >> > >> The main issue I see is what the patch does

Re: Online checksums patch - once again

2020-10-05 Thread Álvaro Herrera
On 2020-Oct-05, Heikki Linnakangas wrote: > The code in sendFile() in basebackup.c seems suspicious in that regard. It > calls DataChecksumsNeedVerify() once before starting to read the file. Isn't > it possible for the checksums flag to change while it's reading the file and > sending it to the c

Re: Improve choose_custom_plan for initial partition prune case

2020-10-05 Thread Ashutosh Bapat
On Thu, Oct 1, 2020 at 9:34 PM Andy Fan wrote: > > Given the plan example: > > CREATE TABLE measurement ( > city_id int not null, > logdate date not null, > peaktempint, > unitsales int > ) PARTITION BY RANGE (logdate); > > CREATE TABLE measurement_y20

Re: Partitionwise join fails under GEQO

2020-10-05 Thread Ashutosh Bapat
On Mon, Oct 5, 2020 at 6:47 AM Tom Lane wrote: > > If you run the core regression tests with geqo_threshold = 2 > (injected, say, via ALTER SYSTEM SET), you will notice the > earlier tests showing some join ordering differences, which > is unsurprising ... but when it gets to partition_join, that

Re: [HACKERS] Custom compression methods

2020-10-05 Thread Tomas Vondra
On Mon, Oct 05, 2020 at 11:17:28AM +0530, Dilip Kumar wrote: On Mon, Oct 5, 2020 at 3:37 AM Tomas Vondra wrote: Thanks, Tomas for your feedback. 9) attcompression ... The main issue I see is what the patch does with attcompression. Instead of just using it to store a the compression method,

Re: Online checksums patch - once again

2020-10-05 Thread Heikki Linnakangas
Replying to an older message in this thread: + /* + * If we reach this point with checksums in inprogress state, we notify + * the user that they need to manually restart the process to enable + * checksums. This is because we cannot launch a dynamic background worker + * directly from here, it

Re: [Patch] Optimize dropping of relation buffers using dlist

2020-10-05 Thread Amit Kapila
On Mon, Oct 5, 2020 at 3:04 PM k.jami...@fujitsu.com wrote: > > On Monday, October 5, 2020 3:30 PM, Amit Kapila wrote: > > > + for (i = 0; i < nforks; i++) > > + { > > + /* Get the total nblocks for a relation's fork */ nForkBlocks = > > + smgrcachednblocks(smgr_reln, forkNum[i]); > > + > > + if (

Re: Support for OUT parameters in procedures

2020-10-05 Thread Pavel Stehule
po 5. 10. 2020 v 11:46 odesílatel Peter Eisentraut < peter.eisentr...@2ndquadrant.com> napsal: > On 2020-09-29 08:23, Pavel Stehule wrote: > > This was an important issue if I remember well. Passing mandatory NULL > > as OUT arguments solves this issue. > > I fully agree so OUT arguments are part

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-05 Thread Dilip Kumar
On Mon, Oct 5, 2020 at 4:53 PM Amit Kapila wrote: > > On Mon, Oct 5, 2020 at 4:26 PM Bharath Rupireddy > wrote: > > > > On Wed, Sep 30, 2020 at 7:38 AM Greg Nancarrow wrote: > > > > > > > I have one question which is common to both this patch and parallel > > inserts in CTAS[1], do we need to sk

Re: Online checksums patch - once again

2020-10-05 Thread Heikki Linnakangas
I looked at patch v22, and I can see two main issues: 1. The one that Robert talked about earlier: A backend checks the local "checksums" state. If it's 'off', it writes a page without checksums. How do you guarantee that the local state doesn't change in between? The implicit assumption seems

Re: deferred primary key and logical replication

2020-10-05 Thread Amit Kapila
On Mon, May 11, 2020 at 2:41 AM Euler Taveira wrote: > > Hi, > > While looking at an old wal2json issue, I stumbled on a scenario that a table > with a deferred primary key is not updatable in logical replication. AFAICS it > has been like that since the beginning of logical decoding and seems to

Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away

2020-10-05 Thread Bharath Rupireddy
On Mon, Oct 5, 2020 at 9:45 AM Fujii Masao wrote: > > > I see the errmsg() with plain texts in other places in the code base > > as well. Is it that we look at the error message and if it is a plain > > text(without database objects or table data), we decide to have no > > translation? Or is ther

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-05 Thread Amit Kapila
On Mon, Oct 5, 2020 at 4:26 PM Bharath Rupireddy wrote: > > On Wed, Sep 30, 2020 at 7:38 AM Greg Nancarrow wrote: > > > > I have one question which is common to both this patch and parallel > inserts in CTAS[1], do we need to skip creating tuple > queues(ExecParallelSetupTupleQueues) as we don't

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-05 Thread Dilip Kumar
On Mon, Oct 5, 2020 at 4:26 PM Bharath Rupireddy wrote: > > On Wed, Sep 30, 2020 at 7:38 AM Greg Nancarrow wrote: > > > > > > > > > > I think you still need to work on the costing part, basically if we > > > > are parallelizing whole insert then plan is like below > > > > > > > > -> Gather > > >

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-05 Thread Bharath Rupireddy
On Wed, Sep 30, 2020 at 7:38 AM Greg Nancarrow wrote: > > > > > > > I think you still need to work on the costing part, basically if we > > > are parallelizing whole insert then plan is like below > > > > > > -> Gather > > > -> Parallel Insert > > > -> Parallel Seq Scan > > > > > > That me

Use standard SIGHUP and SIGTERM handlers in autoprewarm module

2020-10-05 Thread Bharath Rupireddy
Hi, Autoprewarm module is using it's own SIGHUP(apw_sigterm_handler, got_sigterm) and SIGTERM(apw_sighup_handler, got_sighup) handlers which are similar to standard signal handlers(except for a difference [1]). Isn't it good to remove them and use standard SignalHandlerForConfigReload and SignalH

Re: Support for OUT parameters in procedures

2020-10-05 Thread Peter Eisentraut
On 2020-09-29 08:23, Pavel Stehule wrote: This was an important issue if I remember well.  Passing mandatory NULL as OUT arguments solves this issue. I fully agree so OUT arguments are part of the procedure's signature. Unfortunately, there is another difference from functions, but I don't think

Re: small cleanup: unify scanstr() functions

2020-10-05 Thread John Naylor
> > > On Sun, Oct 4, 2020 at 4:20 PM Tom Lane wrote: > > I didn't try very hard to trace the commit history, but I did note that > > almost all of the removed #includes dated to 1996 or so. I'm surprised > > they survived Bruce's occasional attempts at removing unused #includes; > > maybe his scr

RE: [Patch] Optimize dropping of relation buffers using dlist

2020-10-05 Thread k.jami...@fujitsu.com
On Monday, October 5, 2020 3:30 PM, Amit Kapila wrote: > + for (i = 0; i < nforks; i++) > + { > + /* Get the total nblocks for a relation's fork */ nForkBlocks = > + smgrcachednblocks(smgr_reln, forkNum[i]); > + > + if (nForkBlocks == InvalidBlockNumber) { nTotalBlocks = > + InvalidBlockNumber; br

Re: Implementing Incremental View Maintenance

2020-10-05 Thread Yugo NAGATA
Hi, Attached is the rebased patch (v18) to add support for Incremental Materialized View Maintenance (IVM). It is able to be applied to current latest master branch. Also, this now supports simple CTEs (WITH clauses) which do not contain aggregates or DISTINCT like simple sub-queries. This featur

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-05 Thread Amit Kapila
On Mon, Oct 5, 2020 at 1:26 PM Masahiko Sawada wrote: > > On Sat, 3 Oct 2020 at 16:55, Amit Kapila wrote: > > > > On Sat, Oct 3, 2020 at 9:26 AM Masahiko Sawada > > wrote: > > > > > > When we discussed this before, I was thinking that we could have other > > > statistics for physical slots in th

Re: 回复:how to create index concurrently on partitioned table

2020-10-05 Thread Michael Paquier
On Sat, Sep 26, 2020 at 02:56:55PM -0500, Justin Pryzby wrote: > Also, if a partitioned index is clustered, when we clear indisclustered for > other indexes, should we also propogate that to their parent indexes, if any ? I am not sure what you mean here. Each partition's cluster runs in its own

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-05 Thread Masahiko Sawada
On Sat, 3 Oct 2020 at 16:55, Amit Kapila wrote: > > On Sat, Oct 3, 2020 at 9:26 AM Masahiko Sawada > wrote: > > > > When we discussed this before, I was thinking that we could have other > > statistics for physical slots in the same statistics view in the > > future. Having the view show only log

Re: [PATCH] Automatic HASH and LIST partition creation

2020-10-05 Thread Pavel Borisov
> > Sorry for not being clear earlier, I mean the partition name > 'tablename_partnum' can conflict with any existing table name. > As per current impemetation, if I do the following it results in the table > name conflict. > > postgres=# create table tbl_test_5_1(i int); > CREATE TABLE > postgres=