Re: [HACKERS] Add support for tuple routing to foreign partitions

2018-03-19 Thread Amit Langote
On 2018/03/19 20:25, Amit Langote wrote: > That's all I have for now. While testing this patch, I noticed a crash when performing EXPLAIN on update of a partition tree containing foreign partitions. Crash occurs in postgresEndForeignRouting() due to the following Assert failing: Assert(fmstate

XID-assigned idle transactions affect vacuum's job.

2018-03-19 Thread Masahiko Sawada
Hi, Long transactions often annoy users because if a long transaction exists on a database vacuum cannot reclaim efficiently. There are several reason why they exist on a database but it's a common case where users or applications forget to commit/rollback transactions. That is, transaction is not

Re: Problem while setting the fpw with SIGHUP

2018-03-19 Thread Dilip Kumar
On Tue, Mar 20, 2018 at 11:26 AM, Michael Paquier wrote: > On Tue, Mar 20, 2018 at 10:43:55AM +0530, Dilip Kumar wrote: > > I think like WALWriterProcess, we need to call InitXLogInsert for the > > CheckpointerProcess as well as for the BgWriterProcess > > because earlier they were calling InitXL

Re: [HACKERS] taking stdbool.h into use

2018-03-19 Thread Tom Lane
Michael Paquier writes: > On Tue, Mar 13, 2018 at 03:25:39PM -0400, Peter Eisentraut wrote: >> So I'm going back to my proposal from December, to just use stdbool.h >> when sizeof(bool) == 1, and add a static assertion to prevent other >> configurations. > So, on one side of the ring, we have mor

Re: [HACKERS] taking stdbool.h into use

2018-03-19 Thread Michael Paquier
On Tue, Mar 13, 2018 at 03:25:39PM -0400, Peter Eisentraut wrote: > After more digging, there are more problems with having a bool that is > not 1 byte. For example, pg_control has a bool field, so with a > different bool size, pg_control would be laid out differently. That > would require changi

Re: Problem while setting the fpw with SIGHUP

2018-03-19 Thread Michael Paquier
On Tue, Mar 20, 2018 at 10:43:55AM +0530, Dilip Kumar wrote: > I think like WALWriterProcess, we need to call InitXLogInsert for the > CheckpointerProcess as well as for the BgWriterProcess > because earlier they were calling InitXLogInsert while check > RecoveryInProgress before inserting the WAL.

Re: jsonpath

2018-03-19 Thread Tom Lane
Andrew Dunstan writes: >> That seems like a quite limited list of functions. What about >> reworking them providing a way of calling them without risk of >> exception? > I haven't seen a response to this email. Do we need one before > proceeding any further with jsonpath? I've not been followin

Re: Problem while setting the fpw with SIGHUP

2018-03-19 Thread Dilip Kumar
On Fri, Mar 16, 2018 at 10:53 AM, Michael Paquier wrote: > On Tue, Mar 13, 2018 at 05:04:04PM +0900, Michael Paquier wrote: > > Instead of doing what you are suggesting, why not moving > > InitXLogInsert() out of InitXLOGAccess() and change InitPostgres() so as > > the allocations for WAL inserts

Re: jsonpath

2018-03-19 Thread Andrew Dunstan
On Tue, Mar 20, 2018 at 3:36 PM, Andrew Dunstan wrote: > On Fri, Mar 2, 2018 at 8:27 AM, Alexander Korotkov > wrote: >> On Fri, Mar 2, 2018 at 12:40 AM, Nikita Glukhov >> wrote: >>> >>> On 28.02.2018 06:55, Robert Haas wrote: >>> On Mon, Feb 26, 2018 at 10:34 AM, Nikita Glukhov wrote:

Re: jsonpath

2018-03-19 Thread Andrew Dunstan
On Fri, Mar 2, 2018 at 8:27 AM, Alexander Korotkov wrote: > On Fri, Mar 2, 2018 at 12:40 AM, Nikita Glukhov > wrote: >> >> On 28.02.2018 06:55, Robert Haas wrote: >> >>> On Mon, Feb 26, 2018 at 10:34 AM, Nikita Glukhov >>> wrote: Attached 10th version of the jsonpath patches.

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-19 Thread Ashutosh Bapat
On Mon, Mar 19, 2018 at 11:15 PM, Robert Haas wrote: > On Fri, Mar 16, 2018 at 1:50 PM, Ashutosh Bapat > wrote: >>> This patch also renames can_parallel_agg to >>> can_partial_agg and removes the parallelism-specific bits from it. >> >> I think we need to update the comments in this function to u

Re: [HACKERS] GUC for cleanup indexes threshold.

2018-03-19 Thread Kyotaro HORIGUCHI
At Tue, 20 Mar 2018 13:57:19 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20180320.135719.90053076.horiguchi.kyot...@lab.ntt.co.jp> > At Mon, 19 Mar 2018 20:50:48 +0900, Masahiko Sawada > wrote in > > On Mon, Mar 19, 2018 at 2:45 PM, Kyotaro HORIGUCHI > > wrote: > > > At Mon, 19

Re: [HACKERS] GUC for cleanup indexes threshold.

2018-03-19 Thread Kyotaro HORIGUCHI
At Mon, 19 Mar 2018 20:50:48 +0900, Masahiko Sawada wrote in > On Mon, Mar 19, 2018 at 2:45 PM, Kyotaro HORIGUCHI > wrote: > > At Mon, 19 Mar 2018 11:12:58 +0900, Masahiko Sawada > > wrote in > > > >> On Wed, Mar 14, 2018 at 9:25 PM, Alexander Korotkov > >> wrote: > >> > On Wed, Mar 14, 20

Re: ON CONFLICT DO UPDATE for partitioned tables

2018-03-19 Thread Amit Langote
On 2018/03/20 13:30, Amit Langote wrote: > I have incorporated your patch in the main patch after updating the > comments a bit. Also, now that ee49f49 is in [1], the transition > table related tests I proposed yesterday pass nicely. Instead of posting > as a separate patch, I have merged it

Re: [HACKERS] plpgsql - additional extra checks

2018-03-19 Thread Pavel Stehule
2018-03-19 21:47 GMT+01:00 Tomas Vondra : > Hi, > > I'm looking at the updated patch (plpgsql-extra-check-180316.patch), and > this time it applies and builds OK. The one thing I noticed is that the > documentation still uses the old wording for strict_multi_assignement: > > WARNING: Number of ev

Re: ON CONFLICT DO UPDATE for partitioned tables

2018-03-19 Thread Amit Langote
Fujita-san, On 2018/03/19 21:59, Etsuro Fujita wrote: > (2018/03/18 13:17), Alvaro Herrera wrote: >> Alvaro Herrera wrote: >> The only thing that I remain unhappy about this patch is the whole >> adjust_and_expand_partition_tlist() thing.  I fear we may be doing >> redundant and/or misplaced work.

Re: Trigger file behavior with the standby

2018-03-19 Thread Michael Paquier
On Mon, Mar 19, 2018 at 01:27:21PM -0700, Keiko Oda wrote: > I'm seeing the following behavior with a trigger file which is very > confusing to me, I'd like to get some advice of what is the expected > behavior of the trigger file with the standby. This portion from the docs includes your answer:

Re: IndexJoin memory problem using spgist and boxes

2018-03-19 Thread Tom Lane
Alexander Kuzmenkov writes: > The updated version looks good to me. LGTM too. Pushed with some trivial cosmetic adjustments. regards, tom lane

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-19 Thread Kyotaro HORIGUCHI
At Mon, 19 Mar 2018 23:07:13 -0400, Tom Lane wrote in <10037.1521515...@sss.pgh.pa.us> > Michael Paquier writes: > > On Mon, Mar 19, 2018 at 07:15:36PM -0400, Tom Lane wrote: > >> This is a good thing not least because all the GUC_LIST_QUOTE variables > >> are in core. I've been trying to think

Re: inserts into partitioned table may cause crash

2018-03-19 Thread Etsuro Fujita
(2018/03/20 9:34), Amit Langote wrote: On 2018/03/20 5:54, Alvaro Herrera wrote: Etsuro Fujita wrote: Thanks for the updated patches! I think the patches are in good shape, but I did a bit of editorial things; added a bit more comments for ExecPrepareTupleRouting and adjusted regression test

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-19 Thread Michael Paquier
On Mon, Mar 19, 2018 at 10:54:59PM -0400, Chapman Flack wrote: > Ehh, I'm with Craig. The *perl project* identifies which packages (and > versions) are part of perl core in each perl version ... not Red Hat. > > http://cpansearch.perl.org/src/BINGOS/Module-CoreList-5.20180220/lib/Module/CoreList.p

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-19 Thread Tom Lane
Michael Paquier writes: > On Mon, Mar 19, 2018 at 07:15:36PM -0400, Tom Lane wrote: >> This is a good thing not least because all the GUC_LIST_QUOTE variables >> are in core. I've been trying to think of a way that we could have >> correct behavior for variables that the core backend doesn't know

Re: file cloning in pg_upgrade and CREATE DATABASE

2018-03-19 Thread Michael Paquier
On Mon, Mar 19, 2018 at 04:14:15PM +0900, Michael Paquier wrote: > Two other things I have noticed as well: > 1) src/bin/pg_rewind/copy_fetch.c could benefit from similar speed-ups I > think when copying data from source to target using the local mode of > pg_rewind. This could really improve case

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-19 Thread Chapman Flack
On 03/19/18 22:40, Tom Lane wrote: > Craig Ringer writes: >> Yes, looks like tests are necessary. I'd argue it's "test for broken Perl" >> but apparently Fedora think they should split the Perl core dist into tiny >> pieces. > > FWIW, the package boundaries are the same on RHEL6, and probably lon

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-19 Thread Tom Lane
Craig Ringer writes: > On 19 March 2018 at 23:56, Tom Lane wrote: >> ... much excavation finds a complaint about Time::HiRes not being installed > That's absurd. Time::HiRes is a core module, as is Test::More. Sigh. > Yes, looks like tests are necessary. I'd argue it's "test for broken Perl" >

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-19 Thread Craig Ringer
On 19 March 2018 at 23:56, Tom Lane wrote: $ make -j check-world > ... runs for awhile and then fails > ... much excavation finds a complaint about Time::HiRes not being installed > $ sudo yum install perl-Time-HiRes > > That's absurd. Time::HiRes is a core module, as is Test::More. Sigh. Yes, l

Re: INOUT parameters in procedures

2018-03-19 Thread Peter Eisentraut
On 3/19/18 03:25, Rushabh Lathia wrote: > For the FUNCTION when we have single OUT/INOUT parameter  > the return type for that function will be set to the type of OUT parameter. > But in case of PROCEDURE, it's always RECORDOID, why this inconsistency? For procedures, this is just an implementatio

Re: committing inside cursor loop

2018-03-19 Thread Peter Eisentraut
On 3/14/18 08:05, Ildus Kurbangaliev wrote: >> The ROLLBACK call in the first loop iteration undoes the UPDATE >> command that drives the loop. Is it then sensible to continue the >> loop? >> > I think that in the first place ROLLBACK was prohibited because of cases > like this, but it seems to sa

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-19 Thread Michael Paquier
On Mon, Mar 19, 2018 at 07:15:36PM -0400, Tom Lane wrote: > This is a good thing not least because all the GUC_LIST_QUOTE variables > are in core. I've been trying to think of a way that we could have > correct behavior for variables that the core backend doesn't know about > and whose extension s

Re: inserts into partitioned table may cause crash

2018-03-19 Thread Amit Langote
On 2018/03/20 5:54, Alvaro Herrera wrote: > Etsuro Fujita wrote: > >> Thanks for the updated patches! I think the patches are in good shape, but >> I did a bit of editorial things; added a bit more comments for >> ExecPrepareTupleRouting and adjusted regression test stuff to match the >> existing

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-19 Thread Tom Lane
Kyotaro HORIGUCHI writes: > At Fri, 16 Mar 2018 21:15:54 +0900, Michael Paquier > wrote in <20180316121554.ga2...@paquier.xyz> >> Let's be clear. I have listed all the variables in the patch to gather >> more easily opinions, and because it is easier to review the whole stack >> this way. I per

Re: PostgreSQL 10: Segmentation fault when using GROUPING SETS with all unsortable columns

2018-03-19 Thread Andres Freund
Hi, On 2018-03-17 23:43:22 +, Huong Dangminh wrote: > Hi, > > I have found a case which could get segmentation fault when using GROUPING > SETS. > It occurs when columns in GROUPING SETS are all unsortable but hashable. > > Attached grouping_sets_segv.zip include module to reproduce this pr

RE: PostgreSQL 10: Segmentation fault when using GROUPING SETS with all unsortable columns

2018-03-19 Thread Huong Dangminh
Hi, > I have found a case which could get segmentation fault when using GROUPING > SETS. > It occurs when columns in GROUPING SETS are all unsortable but hashable. I have added this thread to current CF. please let me know if you need more information. --- Thanks and best regards, Dang Minh Huo

Re: Problems with Error Messages wrt Domains, Checks

2018-03-19 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Mar 19, 2018 at 8:33 AM, Tom Lane wrote: > ​Another one that seems to fall into the "fairly large-scale work" would be > the: > ​ERROR: more than one row returned by a subquery used as an expression > (that's it, nothing else prints in psql when I run the of

Re: Problems with Error Messages wrt Domains, Checks

2018-03-19 Thread David G. Johnston
On Mon, Mar 19, 2018 at 8:33 AM, Tom Lane wrote: > "David G. Johnston" writes: > > Frankly, I'm not seeing "invalid constant regular expressions" as being a > > large scale problem - but I'll agree that having the error include the > > actual literal being parsed as a RegEx should be done. > > A

Re: neqjoinsel versus "refresh materialized view concurrently"

2018-03-19 Thread Tom Lane
Thomas Munro writes: > On Wed, Mar 14, 2018 at 2:56 PM, Jeff Janes wrote: >> Is there any good way to make the regression tests fail if the plan reverts >> to the bad one? The only thing I can think of would be to make the table >> bigger so the regression tests becomes "noticeably slower", but

Re: Error detail/hint style fixup

2018-03-19 Thread Daniel Gustafsson
> On 19 Mar 2018, at 17:47, Tom Lane wrote: > > Daniel Gustafsson writes: >> Attached patch ensures that (i) details and hints have leading >> capitalization, >> have double spaces after punctuation and ends with period; (ii) context >> should >> not be capitalized and should not end with peri

Re: inserts into partitioned table may cause crash

2018-03-19 Thread Alvaro Herrera
Etsuro Fujita wrote: > Thanks for the updated patches! I think the patches are in good shape, but > I did a bit of editorial things; added a bit more comments for > ExecPrepareTupleRouting and adjusted regression test stuff to match the > existing ones. Attached are the updated patches for HEAD

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Terry Phelps
I put that include from /usr/local/include because 'configure' wasn't finding readline.h (I think). I'll look into this. Thanks again for the help. On Mon, Mar 19, 2018 at 4:44 PM, Tom Lane wrote: > Terry Phelps writes: > > Thank you for your help. That resolved the problem. My bad. > > The bu

Re: [HACKERS] plpgsql - additional extra checks

2018-03-19 Thread Tomas Vondra
Hi, I'm looking at the updated patch (plpgsql-extra-check-180316.patch), and this time it applies and builds OK. The one thing I noticed is that the documentation still uses the old wording for strict_multi_assignement: WARNING: Number of evaluated fields does not match expected. HINT: strict_m

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Tom Lane
Thomas Munro writes: > /usr/local/include/pgtypes_date.h:24:12: note: previous declaration is here > extern int PGTYPESdate_defmt_asc(date *, const char *, char *); > > BTW it looks like 0e1539ba0d0a added const qualifiers to that function > but didn't update the documentation in doc/src/sgml

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Tom Lane
Terry Phelps writes: > Thank you for your help. That resolved the problem. My bad. > The build ran much further and then got another error, which I'll mention > here, and go research it, since it could be just my bleeding edge source > code. > cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdecla

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Thomas Munro
On Tue, Mar 20, 2018 at 9:28 AM, Terry Phelps wrote: > Thank you for your help. That resolved the problem. My bad. > > The build ran much further and then got another error, which I'll mention > here, and go research it, since it could be just my bleeding edge source > code. > > cc -Wall -Wmissing

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Terry Phelps
Thank you for your help. That resolved the problem. My bad. The build ran much further and then got another error, which I'll mention here, and go research it, since it could be just my bleeding edge source code. cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-

Trigger file behavior with the standby

2018-03-19 Thread Keiko Oda
Hello, I'm seeing the following behavior with a trigger file which is very confusing to me, I'd like to get some advice of what is the expected behavior of the trigger file with the standby. (I'm cross-posting this from pgsql-general as I didn't get the response there.) 1. setup the replication,

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Tom Lane
Terry Phelps writes: > I ran configure like this, because it got errors otherwise. O. I wonder > if CFLAGS caused this. > LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include ./configure That would've been fine, but configure then adds onto what you specified as CFLAGS. > And then I ran gm

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Terry Phelps
Only slight different. Here is exact what I entered to get the error: I ran configure like this, because it got errors otherwise. O. I wonder if CFLAGS caused this. LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include ./configure And then I ran gmake like this: gmake LDFLAGS=-L/usr/local

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Tom Lane
Terry Phelps writes: > I did: > cd src/port > gmake -s clean > gmake > It says: > cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement > -Wendif-labels -Wmissing-format-attribute -Wformat-security > -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument > -I/usr/lo

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Terry Phelps
The above was in response to Tom Lane's request to show him a listing of: cd src/port gmake I didn't get any errors when I did that. On Mon, Mar 19, 2018 at 4:11 PM, Andres Freund wrote: > Hi, > > On 2018-03-19 16:07:17 -0400, Terry Phelps wrote: > > I did: > > cd src/port > > gmake -s clean >

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Andres Freund
Hi, On 2018-03-19 16:07:17 -0400, Terry Phelps wrote: > I did: > cd src/port > gmake -s clean > gmake > > It says: > > cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement > -Wendif-labels -Wmissing-format-attribute -Wformat-security > -fno-strict-aliasing -fwrapv -Wno-unu

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Terry Phelps
I did: cd src/port gmake -s clean gmake It says: gmake -C ../backend submake-errcodes gmake[1]: Entering directory '/usr/home/tgphelps/postgresql/src/backend' gmake[1]: Nothing to be done for 'submake-errcodes'. gmake[1]: Leaving directory '/usr/home/tgphelps/postgresql/src/backend' cc -Wall -Wmi

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Terry Phelps
Tom, I'll get what you asked for in a minute. But first, I want to make sure that y'all see that the compiler is clang, and not gcc. Perhaps that's not important. On Mon, Mar 19, 2018 at 4:01 PM, Tom Lane wrote: > Andres Freund writes: > > There seems to be something sketchy afoot here, even ou

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Tom Lane
Andres Freund writes: > There seems to be something sketchy afoot here, even outside of > CFLAGS_SSE42 itself. From the original email: > cc -I/usr/local/include -I../../src/port -DFRONTEND -I../../src/include > -c -o pg_crc32c_sse42.o pg_crc32c_sse42.c > isn't this missing a number of important

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Terry Phelps
I get the following, which appears to be what you were expecting. $ grep sse4 src/Makefile.global CFLAGS_SSE42 = -msse4.2 PG_CRC32C_OBJS = pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o Gmake's version is: $ gmake --version GNU Make 4.2.1 Built for amd64-portbld-freebsd11.1 I installed th

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Andres Freund
On 2018-03-19 15:50:10 -0400, Tom Lane wrote: > [ please keep the list cc'd ] > > Terry Phelps writes: > > I can barely read a configure.in file, but here's what I think you're > > asking for. If not, I'll try again: > > > configure:15453: checking for _mm_crc32_u8 and _mm_crc32_u32 with > > CFL

Re: [HACKERS] why not parallel seq scan for slow functions

2018-03-19 Thread Robert Haas
On Sat, Mar 17, 2018 at 1:16 AM, Amit Kapila wrote: > Test-1 > -- > DO $$ > DECLARE count integer; > BEGIN > For count In 1..100 Loop > Execute 'explain Select ten from tenk1'; > END LOOP; > END; > $$; > > In the above block, I am explaining the simple statement which will > have just

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Tomas Vondra
Hi Arthur, I went through the patch - just skimming through the diffs, will do more testing tomorrow. Here are a few initial comments. 1) max_shared_dictionaries_size / PGC_POSTMASTER I'm not quite sure why the GUC is defined as PGC_POSTMASTER, i.e. why it can't be changed after server start. Th

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Tom Lane
[ please keep the list cc'd ] Terry Phelps writes: > I can barely read a configure.in file, but here's what I think you're > asking for. If not, I'll try again: > configure:15453: checking for _mm_crc32_u8 and _mm_crc32_u32 with > CFLAGS=-msse4.2 > configure:15475: cc -o conftest -Wall -Wmissing

Re: Compile error while building postgresql 10.3

2018-03-19 Thread Tom Lane
Terry Phelps writes: > Just for fun, I am trying to build postgres from source on FreeBSD 11. Yes, > I know I don't need to, and I have already installed the 10.3 server and > client packages, and they run fine. I did a 'git clone' today, and have > hours-old source code. FWIW, development-code i

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Arthur Zakirov
On Mon, Mar 19, 2018 at 07:40:54PM +0100, Tomas Vondra wrote: > > > On 03/19/2018 07:07 PM, Andres Freund wrote: > > You've to manually configure a setting that can only be set at server > > start. You can't set it as big as necessary because it might use up > > memory better used for other thin

Re: IndexJoin memory problem using spgist and boxes

2018-03-19 Thread Alexander Kuzmenkov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:not tested The updated version looks good to me. make installcheck under valgrind fi

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Tomas Vondra
On 03/19/2018 07:07 PM, Andres Freund wrote: > On 2018-03-19 14:52:34 +0100, Tomas Vondra wrote: >> On 03/19/2018 02:34 AM, Andres Freund wrote: >>> Hi, >>> >>> On 2018-03-19 01:52:41 +0100, Tomas Vondra wrote: I do agree with that. We have a working well-understood dsm-based solution,

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Andres Freund
On 2018-03-19 14:52:34 +0100, Tomas Vondra wrote: > On 03/19/2018 02:34 AM, Andres Freund wrote: > > Hi, > > > > On 2018-03-19 01:52:41 +0100, Tomas Vondra wrote: > >> I do agree with that. We have a working well-understood dsm-based > >> solution, addressing the goals initially explained in this

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-19 Thread Robert Haas
On Fri, Mar 16, 2018 at 1:50 PM, Ashutosh Bapat wrote: >> This patch also renames can_parallel_agg to >> can_partial_agg and removes the parallelism-specific bits from it. > > I think we need to update the comments in this function to use phrase > "partial aggregation" instead of "parallel aggrega

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-19 Thread Robert Haas
On Fri, Mar 16, 2018 at 1:50 PM, Ashutosh Bapat wrote: > Ok. That looks good. Here's an updated version. In this version, based on a voice discussion with Ashutosh and Jeevan, I adjusted 0001 to combine it with an earlier idea of splitting Gather/Gather Merge path generation out of the function

Re: MCV lists for highly skewed distributions

2018-03-19 Thread John Naylor
On 3/19/18, Dean Rasheed wrote: > As promised, here is a new patch, with comment updates, per John and > Tomas' suggestions, plus the continuity correction, which seemed just > about worthwhile. Great. I'm happy with the behavior of the patch. I've marked it ready for committer. > I repeated the

Re: Error detail/hint style fixup

2018-03-19 Thread Tom Lane
Daniel Gustafsson writes: > Attached patch ensures that (i) details and hints have leading capitalization, > have double spaces after punctuation and ends with period; (ii) context should > not be capitalized and should not end with period; (iii) test .out files match > the changes. +1 for cleani

Re: Problems with Error Messages wrt Domains, Checks

2018-03-19 Thread David G. Johnston
On Mon, Mar 19, 2018 at 9:11 AM, Tom Lane wrote: > "David G. Johnston" writes: > > On Mon, Mar 19, 2018 at 8:33 AM, Tom Lane wrote: > >> But I wonder if we wouldn't be better off to put the regex into a > >> detail line, ie > >> errmsg("invalid regular expression: %s", ...), > >>

Re: Problems with Error Messages wrt Domains, Checks

2018-03-19 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Mar 19, 2018 at 8:33 AM, Tom Lane wrote: >> But I wonder if we wouldn't be better off to put the regex into a >> detail line, ie >> errmsg("invalid regular expression: %s", ...), >> errdetail("Regular expression is \"%s\".", ...), >

Re: parallel append vs. simple UNION ALL

2018-03-19 Thread Robert Haas
On Fri, Mar 16, 2018 at 7:35 AM, Rajkumar Raghuwanshi wrote: > On Fri, Mar 9, 2018 at 1:04 AM, Robert Haas wrote: >> Great. Committed 0001. Are you planning any further testing of this >> patch series? > > Sorry I missed the mail. > Yes, I have further tested patches and find no more issues. O

configure's checks for --enable-tap-tests are insufficient

2018-03-19 Thread Tom Lane
So I just went through a rather annoying process trying to run check-world on a Fedora 26 box where I hadn't done it before: $ ./configure --enable-tap-tests ... fails, whining about IPC::Run $ sudo yum install perl-IPC-Run $ ./configure --enable-tap-tests ... fails, whining about prove ... figure

Re: Problems with Error Messages wrt Domains, Checks

2018-03-19 Thread David G. Johnston
On Mon, Mar 19, 2018 at 8:33 AM, Tom Lane wrote: > "David G. Johnston" writes: > > Frankly, I'm not seeing "invalid constant regular expressions" as being a > > large scale problem - but I'll agree that having the error include the > > actual literal being parsed as a RegEx should be done. > > A

Error detail/hint style fixup

2018-03-19 Thread Daniel Gustafsson
When fixing review comments for error message style on another patch, I noticed that there were a few error details/hints/contexts that weren’t following the style guide in the documentation. This might be intentional from when they were added, or we intentionally avoid changing after the fact to

Re: inserts into partitioned table may cause crash

2018-03-19 Thread Robert Haas
On Mon, Mar 19, 2018 at 9:38 AM, Alvaro Herrera wrote: > Etsuro Fujita wrote: >> Thanks for the updated patches! I think the patches are in good shape, but >> I did a bit of editorial things; added a bit more comments for >> ExecPrepareTupleRouting and adjusted regression test stuff to match the

Re: Problems with Error Messages wrt Domains, Checks

2018-03-19 Thread Tom Lane
"David G. Johnston" writes: > Frankly, I'm not seeing "invalid constant regular expressions" as being a > large scale problem - but I'll agree that having the error include the > actual literal being parsed as a RegEx should be done. Agreed. Doing anything about the other stuff discussed in this

Re: Faster inserts with mostly-monotonically increasing values

2018-03-19 Thread Claudio Freire
On Mon, Mar 19, 2018 at 11:57 AM, Pavan Deolasee wrote: > > > On Thu, Mar 15, 2018 at 7:51 AM, Claudio Freire > wrote: >> >> >> >> I applied the attached patches on top of your patch, so it would be >> nice to see if you can give it a try in your test hardware to see >> whether it helps. > > > I

Re: Faster inserts with mostly-monotonically increasing values

2018-03-19 Thread Pavan Deolasee
On Thu, Mar 15, 2018 at 7:51 AM, Claudio Freire wrote: > > > I applied the attached patches on top of your patch, so it would be > nice to see if you can give it a try in your test hardware to see > whether it helps. > I can confirm that I no longer see any regression at 8 or even 16 clients. In

Re: [HACKERS] GUC for cleanup indexes threshold.

2018-03-19 Thread Claudio Freire
On Mon, Mar 19, 2018 at 8:50 AM, Masahiko Sawada wrote: >>> require the bulk-delete method of scanning whole index and of logging >>> WAL. But it leads some extra overhead. With this patch we no longer >>> need to depend on the full scan on b-tree index. This might be useful >>> for a future when

Re: Problems with Error Messages wrt Domains, Checks

2018-03-19 Thread David G. Johnston
On Sat, Mar 17, 2018 at 12:54 PM, john frazer wrote: > > -- Forwarded message -- > From: john frazer > Date: Sat, Mar 17, 2018 at 6:28 PM > Subject: Re: Problems with Error Messages wrt Domains, Checks > To: "David G. Johnston" > > > As such, it could be anywhere in my many,

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Tomas Vondra
On 03/19/2018 02:34 AM, Andres Freund wrote: > Hi, > > On 2018-03-19 01:52:41 +0100, Tomas Vondra wrote: >> I do agree with that. We have a working well-understood dsm-based >> solution, addressing the goals initially explained in this thread. > > Well, it's also awkward and manual to use. I do t

Re: inserts into partitioned table may cause crash

2018-03-19 Thread Alvaro Herrera
Etsuro Fujita wrote: > Thanks for the updated patches! I think the patches are in good shape, but > I did a bit of editorial things; added a bit more comments for > ExecPrepareTupleRouting and adjusted regression test stuff to match the > existing ones. Attached are the updated patches for HEAD

Re: ON CONFLICT DO UPDATE for partitioned tables

2018-03-19 Thread Etsuro Fujita
(2018/03/18 13:17), Alvaro Herrera wrote: Alvaro Herrera wrote: The only thing that I remain unhappy about this patch is the whole adjust_and_expand_partition_tlist() thing. I fear we may be doing redundant and/or misplaced work. I'll look into it next week. I'm still reviewing the patches, b

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Ildus Kurbangaliev
On Mon, 19 Mar 2018 14:06:50 +0300 Arthur Zakirov wrote: > > I beleive mmap requires completely rewrite 0003 part of the patch and > a little changes in 0005. > > > In any case, I suggest to polish the dsm-based patch, and see if we > > can get that one into PG11. > > Yes we have more time i

Re: Online enabling of checksums

2018-03-19 Thread Andrey Borodin
Hi Magnus! > 19 марта 2018 г., в 16:57, Magnus Hagander написал(а): > > On Mon, Mar 19, 2018 at 12:24 PM, Magnus Hagander > wrote: > On Mon, Mar 19, 2018 at 11:40 AM, Andrey Borodin > wrote: > Hi, Daniel! > If we commit online checksums

Re: Online enabling of checksums

2018-03-19 Thread Magnus Hagander
On Mon, Mar 19, 2018 at 12:24 PM, Magnus Hagander wrote: > On Mon, Mar 19, 2018 at 11:40 AM, Andrey Borodin > wrote: > >> Hi, Daniel! >> >> > 19 марта 2018 г., в 4:01, Daniel Gustafsson >> написал(а): >> > >> > Fixed in patch just posted in 84693D0C-772F-45C2-88A1-85B498 >> 3a5...@yesql.se >> >

Re: [HACKERS] GUC for cleanup indexes threshold.

2018-03-19 Thread Masahiko Sawada
On Mon, Mar 19, 2018 at 2:45 PM, Kyotaro HORIGUCHI wrote: > At Mon, 19 Mar 2018 11:12:58 +0900, Masahiko Sawada > wrote in >> On Wed, Mar 14, 2018 at 9:25 PM, Alexander Korotkov >> wrote: >> > On Wed, Mar 14, 2018 at 7:40 AM, Masahiko Sawada >> > wrote: >> >> >> >> On Sat, Mar 10, 2018 at 3:4

Re: inserts into partitioned table may cause crash

2018-03-19 Thread Etsuro Fujita
(2018/03/19 17:48), Amit Langote wrote: On 2018/03/16 20:37, Etsuro Fujita wrote: (2018/03/14 17:25), Etsuro Fujita wrote: (2018/03/14 14:54), Amit Langote wrote: Btw, I noticed that the patches place ExecPrepareTupleRouting (both the declaration and the definition) at different relative locat

Re: [HACKERS] Add support for tuple routing to foreign partitions

2018-03-19 Thread Amit Langote
Fujita-san, Thanks for sending the updated patches. On 2018/02/27 21:01, Etsuro Fujita wrote: > (2018/02/21 20:54), Etsuro Fujita wrote: >> void >> BeginForeignRouting(); >> >> Prepare for a tuple-routing operation on a foreign table. This is called >> from ExecSetupPartitionTupleRouting and Exec

Re: Online enabling of checksums

2018-03-19 Thread Magnus Hagander
On Mon, Mar 19, 2018 at 11:40 AM, Andrey Borodin wrote: > Hi, Daniel! > > > 19 марта 2018 г., в 4:01, Daniel Gustafsson > написал(а): > > > > Fixed in patch just posted in 84693D0C-772F-45C2-88A1- > 85b4983a5...@yesql.se > > (version 5). Thanks! > > > I've been hacking a bit in neighboring threa

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Arthur Zakirov
Arthur Zakirov wrote: > I've planned only to improve the documentation a little. Also it seems I > should change 0004 part, I found that extension upgrade scripts may be made > in wrong way. I've attached new version of the patch. In this version I removed 0004-Update-tmplinit-arguments-v6.patch.

Re: User defined data types in Logical Replication

2018-03-19 Thread Masahiko Sawada
On Mon, Mar 19, 2018 at 12:50 PM, Masahiko Sawada wrote: > On Fri, Mar 16, 2018 at 10:24 AM, Alvaro Herrera > wrote: >> Masahiko Sawada wrote: >>> On Thu, Mar 15, 2018 at 9:41 AM, Alvaro Herrera >>> wrote: >> >>> > I think this is a worthwhile test, but IMO it should be improved a bit >>> > bef

Re: Online enabling of checksums

2018-03-19 Thread Andrey Borodin
Hi, Daniel! > 19 марта 2018 г., в 4:01, Daniel Gustafsson написал(а): > > Fixed in patch just posted in 84693d0c-772f-45c2-88a1-85b4983a5...@yesql.se > (version 5). Thanks! I've been hacking a bit in neighboring thread. And come across one interesting thing. There was a patch on this CF on ena

Re: [HACKERS] path toward faster partition pruning

2018-03-19 Thread David Rowley
On 19 March 2018 at 23:03, Amit Langote wrote: > Just recently, I replied to a pgsql-bugs report by someone who had OOM > kill a backend running `delete from > partitioned_table_with_7202_partitions` on their test system [1]. That'd > be because running inheritance_planner on a partitioned table

Re: [Patch] Checksums for SLRU files

2018-03-19 Thread Andrey Borodin
Hi, Ivan! > 5 марта 2018 г., в 20:58, Andrey Borodin написал(а): > > I've found that there are few more places with SLRU items per page I was looking into this patch mainly because I was reviewing other checksums patch in different thread. But the purpose of this patch seems viable for me. Aft

Re: [HACKERS] path toward faster partition pruning

2018-03-19 Thread Amit Langote
Hi David. On 2018/03/19 16:18, David Rowley wrote: > On 17 March 2018 at 01:55, Amit Langote wrote: >> Hope the attached version is easier to understand. > > Hi Amit, > > Thanks for making the updates. I'll look at them soon. > > I've been thinking about how we're making these improvements for

Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows

2018-03-19 Thread Kyotaro HORIGUCHI
Hello. The objective of this patch looks reasonable and this doesn't affect ecpg applications except for the problematic case that happens only on Windows. So the points here are only the documentation, the new function name and the how we should place the new defintion. At Mon, 5 Feb 2018 00:53:

Re: Typo in be_tls_write

2018-03-19 Thread Magnus Hagander
On Mon, Mar 19, 2018 at 10:28 AM, Daniel Gustafsson wrote: > Spotted a typo in be_tls_write(), fix attached. > Applied, thanks. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Typo in be_tls_write

2018-03-19 Thread Daniel Gustafsson
Spotted a typo in be_tls_write(), fix attached. cheers ./daniel typo-tls_write.patch Description: Binary data

Re: ON CONFLICT DO UPDATE for partitioned tables

2018-03-19 Thread Amit Langote
On 2018/03/19 16:45, Amit Langote wrote: > I have tried to make these changes and attached are the updated patches > containing those, including the change I suggested for 0001 (that is, > getting rid of mt_onconflict). I also expanded some comments in 0003 > while making those changes. I realize

Re: inserts into partitioned table may cause crash

2018-03-19 Thread Amit Langote
Fujita-san, Thanks for the review. On 2018/03/16 20:37, Etsuro Fujita wrote: > (2018/03/14 17:25), Etsuro Fujita wrote: >> (2018/03/14 14:54), Amit Langote wrote: >>> Btw, I noticed that the patches place ExecPrepareTupleRouting (both the >>> declaration and the definition) at different relative

  1   2   >