Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Peter Geoghegan
On Fri, Sep 22, 2017 at 8:56 PM, Tom Lane wrote: > The big concern I have here is that this feels a lot like something that > we'll regret at leisure, if it's not right in the first release. I'd > much rather be restrictive in v10 and then loosen the rules later, than > be

Re: [HACKERS] pgbench - use enum for meta commands

2017-09-22 Thread Pavel Stehule
2017-09-23 5:45 GMT+02:00 Fabien COELHO : > > Minor code enhancement. > > While having a look at adding if/elif/else/endif to pgbench, and given the > current gset/cset added meta commands in cf queue, it occured to me that > repeated string comparisons to check for the

Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Tom Lane
Robert Haas writes: > Peter, with respect, it's time to let this argument go. We're > scheduled to wrap a GA release in just over 72 hours. FWIW, the release is a week from Monday, not Monday. (Or if it is Monday, somebody else is wrapping it.) We have some other

[HACKERS] pgbench - use enum for meta commands

2017-09-22 Thread Fabien COELHO
Minor code enhancement. While having a look at adding if/elif/else/endif to pgbench, and given the current gset/cset added meta commands in cf queue, it occured to me that repeated string comparisons to check for the various meta commands is neither efficient nor readable. Use an enum

Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?

2017-09-22 Thread Tom Lane
Andrew Dunstan writes: > On 09/22/2017 05:46 PM, Tom Lane wrote: >> I'm not sure if that qualifies as a stop-ship problem, but it ain't >> good, for sure. We need to look at whether we should revert 15bc038f9 >> or somehow revise its rules. > I wonder if we

Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Peter Geoghegan
On Fri, Sep 22, 2017 at 5:58 PM, Robert Haas wrote: > On Fri, Sep 22, 2017 at 4:46 PM, Peter Geoghegan wrote: >> But you are *already* canonicalizing ICU collation names as BCP 47. My >> point here is: Why not finish the job off, and *also* canonicalize >>

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-22 Thread Andres Freund
Hi, On 2017-09-22 17:11:47 -0700, Gregory Brail wrote: > Also in lieu of the new snapshot mechanism for logical replication, which > might not work for us This needs context... >, we were using the transaction ID to calculate what > was committed in a client's snapshot and what they need to

Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?

2017-09-22 Thread Andrew Dunstan
On 09/22/2017 05:46 PM, Tom Lane wrote: > bal...@obiserver.hu writes: >> PostgreSQL version: 10beta4 >> testdb=# begin; >> BEGIN >> testdb=# create type enumtype as enum ('v1', 'v2'); >> CREATE TYPE >> testdb=# alter type enumtype owner to testrole; >> ALTER TYPE >> testdb=# create table

Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Robert Haas
On Fri, Sep 22, 2017 at 4:46 PM, Peter Geoghegan wrote: > But you are *already* canonicalizing ICU collation names as BCP 47. My > point here is: Why not finish the job off, and *also* canonicalize > colcollate in the same way? Peter, with respect, it's time to let this argument

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-22 Thread Gregory Brail
Thanks! I didn't read the version 10 RC docs carefully enough. I found the code that generates the protocol message (looks like its replication/proto/logical.c). Are there docs somewhere on the format, or is it just the code? Also in lieu of the new snapshot mechanism for logical replication,

Re: [HACKERS] Built-in plugin for logical decoding output

2017-09-22 Thread Alvaro Hernandez
On 23/09/17 00:28, Gregory Brail wrote: We have been working on a project that makes extensive use of logical replication for use inside Apigee (which is a very small part of Google): https://github.com/apigee-labs/transicator In order to do this, we had to write our own logical replication

[HACKERS] Built-in plugin for logical decoding output

2017-09-22 Thread Gregory Brail
We have been working on a project that makes extensive use of logical replication for use inside Apigee (which is a very small part of Google): https://github.com/apigee-labs/transicator In order to do this, we had to write our own logical replication plugin because the supplied "test_decoding"

Re: [HACKERS] Small improvement to compactify_tuples

2017-09-22 Thread Claudio Freire
On Tue, Sep 12, 2017 at 12:49 PM, Sokolov Yura wrote: > On 2017-07-21 13:49, Sokolov Yura wrote: >> >> On 2017-05-17 17:46, Sokolov Yura wrote: >>> >>> Alvaro Herrera писал 2017-05-15 20:13: As I understand, these patches are logically separate, so putting

Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?

2017-09-22 Thread Tom Lane
bal...@obiserver.hu writes: > PostgreSQL version: 10beta4 > testdb=# begin; > BEGIN > testdb=# create type enumtype as enum ('v1', 'v2'); > CREATE TYPE > testdb=# alter type enumtype owner to testrole; > ALTER TYPE > testdb=# create table testtable (enumcolumn enumtype not null default 'v1'); >

[HACKERS] Rethinking autovacuum.c memory handling

2017-09-22 Thread Tom Lane
I notice that autovacuum.c calls autovacuum_do_vac_analyze, and thereby vacuum(), in TopTransactionContext. This doesn't seem like a terribly great idea, because it doesn't correspond to what happens during a manually-invoked vacuum. TopTransactionContext will go away when vacuum() commits the

Re: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering

2017-09-22 Thread Robert Haas
On Fri, Sep 22, 2017 at 4:23 PM, Julien Rouhaud wrote: > That was one of the first question we had with the initial POC. The > reason is that this "sorted append" is not using a merge algorithm but > just appending partitions in the right order, so it looked like we > could

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-09-22 Thread Peter Eisentraut
On 9/19/17 19:00, Michael Paquier wrote: > On Wed, Sep 20, 2017 at 7:57 AM, Peter Eisentraut > wrote: >> To get things rolling, I have committed just the basic TAP tests, to >> give it a spin on the build farm. I'll work through the rest in the >> coming days.

Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Peter Geoghegan
On Fri, Sep 22, 2017 at 11:34 AM, Peter Eisentraut wrote: > After reviewing this thread and testing around a bit, I think the code > is mostly fine as it is, but the documentation is lacking. Hence, > attached is a patch to expand the documentation quite a bit,

Re: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering

2017-09-22 Thread Julien Rouhaud
On Fri, Sep 22, 2017 at 9:58 PM, Robert Haas wrote: > On Fri, Sep 22, 2017 at 3:34 PM, Julien Rouhaud wrote: >> PFA v3 of the patch, once again rebased and that now use all the newly >> available infrastructure. >> >> I also added a check that a sorted

Re: [HACKERS] 10RC1 crash testing MultiXact oddity

2017-09-22 Thread Robert Haas
On Fri, Sep 22, 2017 at 3:39 PM, Jeff Janes wrote: > It turns out it is not new in pg10. I spotted in the log file only by > accident while looking for something else. Now that I am looking for it, I > do see it in 9.6 as well. So I guess the next question is whether it

Re: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering

2017-09-22 Thread Robert Haas
On Fri, Sep 22, 2017 at 3:34 PM, Julien Rouhaud wrote: > PFA v3 of the patch, once again rebased and that now use all the newly > available infrastructure. > > I also added a check that a sorted append can't be generated when a > default partition has been declared. I just

Re: [HACKERS] Page Scan Mode in Hash Index

2017-09-22 Thread Ashutosh Sharma
On Fri, Sep 22, 2017 at 11:56 PM, Robert Haas wrote: > On Thu, Sep 21, 2017 at 3:08 AM, Ashutosh Sharma > wrote: >> I have added a note for handling of logged and unlogged tables in >> README file and also corrected the header comment for >>

Re: [HACKERS] 10RC1 crash testing MultiXact oddity

2017-09-22 Thread Jeff Janes
On Fri, Sep 22, 2017 at 8:47 AM, Alvaro Herrera wrote: > Jeff Janes wrote: > > I am running some crash recovery testing against 10rc1 by injecting torn > > page writes, using a test case which generates a lot of multixact, some > > naturally by doing a lot fk updates,

Re: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering

2017-09-22 Thread Julien Rouhaud
On Thu, Sep 21, 2017 at 11:13 AM, Julien Rouhaud wrote: > On Thu, Sep 21, 2017 at 10:52 AM, Ashutosh Bapat > wrote: >> With 9140cf8269b0c4ae002b2748d93979d535891311, we store the >> RelOptInfos of partitions in the RelOptInfo of partitioned

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-22 Thread Pavel Stehule
2017-09-22 21:12 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 9/22/17 09:16, Pavel Stehule wrote: > > Example: somebody set SORT_COLUMNS to schema_name value. This is > > nonsense for \l command > > > > Now, I am thinking so more correct and practical design is based on >

Re: [HACKERS] Patch: add --if-exists to pg_recvlogical

2017-09-22 Thread Peter Eisentraut
On 9/20/17 02:26, Rosser Schwarz wrote: > The more I think about it, I don't think it's nonsensical, though. > --create-slot --if-exists or --drop-slot --if-not-exists, obviously. I > mean, do you even logic? Those pieces make sense. We have many CREATE IF NOT EXISTS and DROP IF EXISTS commands.

[HACKERS] Shaky coding for vacuuming partitioned relations

2017-09-22 Thread Tom Lane
Somebody inserted this into vacuum.c's get_rel_oids(): tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(relid)); if (!HeapTupleIsValid(tuple)) elog(ERROR, "cache lookup failed for relation %u", relid); apparently without having read the very verbose comment two lines

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-22 Thread Peter Eisentraut
On 9/22/17 09:16, Pavel Stehule wrote: > Example: somebody set SORT_COLUMNS to schema_name value. This is > nonsense for \l command > > Now, I am thinking so more correct and practical design is based on > special mode, activated by variable > > PREFER_SIZE_SORT .. (off, asc, desc) > > This has

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-22 Thread Peter Eisentraut
On 9/21/17 04:43, Masahiko Sawada wrote: >> Once we got this patch, DROP SUBSCRIPTION is not transactional either >> if dropping a replication slot or if the subscription got disabled in >> a transaction block. But we disallow to do DROP SUBSCRIPTION in a >> transaction block only in the former

Re: [HACKERS] "inconsistent page found" with checksum and wal_consistency_checking enabled

2017-09-22 Thread Robert Haas
On Wed, Sep 20, 2017 at 12:52 AM, Michael Paquier wrote: > Indeed. This had better be fixed before PG10 is out. I am adding an open item. This seems a little hyperbolic to me. Sure, it's a new bug in v10, and sure, it's always better to fix bugs sooner rather than

Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Peter Eisentraut
On 9/21/17 16:55, Peter Geoghegan wrote: >> I strongly prefer if there, as much as possible, is only one format for >> inputting ICU locales. > I agree, but the bigger issue is that we're *half way* between > supporting only one format, and supporting two formats. AFAICT, there > is no reason that

Re: [HACKERS] Page Scan Mode in Hash Index

2017-09-22 Thread Robert Haas
On Thu, Sep 21, 2017 at 3:08 AM, Ashutosh Sharma wrote: > I have added a note for handling of logged and unlogged tables in > README file and also corrected the header comment for > hashbucketcleanup(). Please find the attached 0003*.patch having these > changes. Thanks. I

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-22 Thread Alexander Korotkov
On Fri, Sep 22, 2017 at 7:16 PM, chenhj wrote: > This is the new pacth with TAP test and use Macro XLOGDIR. > Good. I took a quick look over the patch. Why do you need master_query(), standby_query() and run_query() in RewindTest.pm? You can do just $node_master->safe_psql()

Re: [HACKERS] pgbench regression test failure

2017-09-22 Thread Fabien COELHO
[...] After another week of buildfarm runs, we have a few more cases of 3 rows of output, and none of more than 3 or less than 1. So I went ahead and pushed your patch. I'm still suspicious of these results, but we might as well try to make the buildfarm green pending investigation of how

Re: [HACKERS] additional contrib test suites

2017-09-22 Thread Andres Freund
On 2017-09-18 09:54:52 -0400, Peter Eisentraut wrote: > On 9/16/17 08:10, David Steele wrote: > >>> (5) drop contrib/chkpass altogether, on the grounds that it's too badly > >>> designed, and too obsolete crypto-wise, to be useful or supportable. > >> crypt() uses the 7 lowest characters, which

Re: [HACKERS] pgbench regression test failure

2017-09-22 Thread Tom Lane
Fabien COELHO writes: >> It could be as simple as putting the check-for-done at the bottom of the >> loop not the top, perhaps. > I agree that it is best if tests should work in all reasonable conditions, > including a somehow overloaded host... > I'm going to think about

Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.

2017-09-22 Thread Melanie Plageman
On Tue, Sep 19, 2017 at 4:15 PM, Melanie Plageman wrote: > > The latest patch applies cleanly and builds (I am also seeing the failing > TAP tests), however, I have a concern. With a single server set up, when I > attempt to make a connection with

Re: [HACKERS] close_ps, NULLs, and DirectFunctionCall

2017-09-22 Thread Robert Haas
On Wed, Sep 20, 2017 at 4:25 PM, Andrew Gierth wrote: > postgres=# select point(1,2) ## '((0,0),(NaN,NaN))'::box; > ERROR: function 0x9c5de0 returned NULL > > postgres=# select point(1,2) <-> '((0,0),(NaN,NaN))'::box; > ERROR: function 0x9c5de0 returned NULL > >

Re: [HACKERS] ICU locales and text/char(n) SortSupport on Windows

2017-09-22 Thread Peter Geoghegan
On Fri, Sep 22, 2017 at 7:25 AM, Peter Eisentraut wrote: > I agree. The attached patch should do it. I see one small issue here: You'll now need to set ssup->comparator back to NULL before you return early in the Windows' libc case. That way, a shim comparator

Re: [HACKERS] 10RC1 crash testing MultiXact oddity

2017-09-22 Thread Robert Haas
On Fri, Sep 22, 2017 at 11:37 AM, Jeff Janes wrote: > Is the presence of this log message something that needs to be investigated > further? I'd say yes. It sounds like we have a race condition someplace that previous fixes in this area failed to adequately understand. --

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-22 Thread chenhj
Hi This is the new pacth with TAP test and use Macro XLOGDIR. And i had add this patch to the commitfest, https://commitfest.postgresql.org/15/1302/ -- Best Regards, Chen Huajun pg_rewind_wal_copy_reduce_v2.patch Description: Binary data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] additional contrib test suites

2017-09-22 Thread Peter Eisentraut
On 9/18/17 09:54, Peter Eisentraut wrote: > On 9/16/17 08:10, David Steele wrote: (5) drop contrib/chkpass altogether, on the grounds that it's too badly designed, and too obsolete crypto-wise, to be useful or supportable. >>> crypt() uses the 7 lowest characters, which makes for 7.2e16

Re: [HACKERS] 10RC1 crash testing MultiXact oddity

2017-09-22 Thread Alvaro Herrera
Jeff Janes wrote: > I am running some crash recovery testing against 10rc1 by injecting torn > page writes, using a test case which generates a lot of multixact, some > naturally by doing a lot fk updates, but most artificially by calling > the pg_burn_multixact function from one of the attached

Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Peter Geoghegan
On Fri, Sep 22, 2017 at 1:50 AM, Andreas Karlsson wrote: > On 09/21/2017 10:55 PM, Peter Geoghegan wrote: >> >> I agree, but the bigger issue is that we're *half way* between >> supporting only one format, and supporting two formats. AFAICT, there >> is no reason that we can't

[HACKERS] 10RC1 crash testing MultiXact oddity

2017-09-22 Thread Jeff Janes
I am running some crash recovery testing against 10rc1 by injecting torn page writes, using a test case which generates a lot of multixact, some naturally by doing a lot fk updates, but most artificially by calling the pg_burn_multixact function from one of the attached patches. In 22 hours of

Re: [HACKERS] !USE_WIDE_UPPER_LOWER compile errors in v10+

2017-09-22 Thread Tom Lane
Peter Eisentraut writes: > On 9/21/17 17:38, Tom Lane wrote: >> Meanwhile, I see that Peter has posted a fix for the immediate problem. >> I propose that Peter should apply his fix in HEAD and v10, and then > done >> I'll rip out the !USE_WIDE_UPPER_LOWER code

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Darafei Praliaskouski
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed We're using Postgres with this patch for some time. In our

[HACKERS] Re: "inconsistent page found" with checksum and wal_consistency_checking enabled

2017-09-22 Thread Noah Misch
On Wed, Sep 20, 2017 at 01:52:15PM +0900, Michael Paquier wrote: > On Wed, Sep 20, 2017 at 5:23 AM, Ashwin Agrawal wrote: > > Currently, page checksum is not masked by Page masking routines used by > > wal_consistency_checking facility. So, when running `make installcheck`

Re: [HACKERS] coverage analysis improvements

2017-09-22 Thread Peter Eisentraut
On 9/21/17 03:42, Michael Paquier wrote: > -SPI.c: SPI.xs plperl_helpers.h > +%.c: %.xs > @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch > --with-perl was not specified."; exit 1; fi > - $(PERL) $(XSUBPPDIR)/ExtUtils/xsubpp -typemap > $(perl_privlibexp)/ExtUtils/typemap $<

Re: [HACKERS] ICU locales and text/char(n) SortSupport on Windows

2017-09-22 Thread Peter Eisentraut
On 9/21/17 15:21, Peter Geoghegan wrote: > On Thu, Sep 21, 2017 at 12:12 PM, Peter Eisentraut > wrote: >>> Attached patch shows what I'm getting at. This is untested, since I >>> don't use Windows. Proceed with caution. >> >> Your analysis makes sense, but the

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Sokolov Yura
On 2017-09-22 16:22, Sokolov Yura wrote: On 2017-09-22 11:21, Masahiko Sawada wrote: On Fri, Sep 22, 2017 at 4:16 PM, Kyotaro HORIGUCHI wrote: At Fri, 22 Sep 2017 15:00:20 +0900, Masahiko Sawada wrote in

Re: [HACKERS] [COMMITTERS] pgsql: Fix bool/int type confusion

2017-09-22 Thread Tom Lane
Peter Eisentraut writes: > On 9/21/17 14:58, Tom Lane wrote: >> I've just been going through their git commit log to see what else has >> changed since tzcode2017b, and I note that there are half a dozen other >> portability-ish fixes. I think that some of them

Re: [HACKERS] !USE_WIDE_UPPER_LOWER compile errors in v10+

2017-09-22 Thread Peter Eisentraut
On 9/21/17 17:38, Tom Lane wrote: > Meanwhile, I see that Peter has posted a fix for the immediate problem. > I propose that Peter should apply his fix in HEAD and v10, and then done > I'll rip out the !USE_WIDE_UPPER_LOWER code paths in HEAD only. -- Peter Eisentraut

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Sokolov Yura
On 2017-09-22 11:21, Masahiko Sawada wrote: On Fri, Sep 22, 2017 at 4:16 PM, Kyotaro HORIGUCHI wrote: At Fri, 22 Sep 2017 15:00:20 +0900, Masahiko Sawada wrote in On

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-22 Thread Pavel Stehule
2017-09-21 20:30 GMT+02:00 Pavel Stehule : > > > 2017-09-21 20:20 GMT+02:00 Peter Eisentraut com>: > >> On 9/21/17 13:54, Pavel Stehule wrote: >> > I see where you are coming from, but there is no association in the >> > existing

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-22 Thread Ashutosh Bapat
On Fri, Sep 15, 2017 at 5:29 PM, Ashutosh Bapat wrote: > >> >> Apart from these there is a regression case on a custom table, on head >> query completes in 20s and with this patch it takes 27s. Please find >> the attached .out and .sql file for the output and

Re: [HACKERS] [COMMITTERS] pgsql: Fix bool/int type confusion

2017-09-22 Thread Peter Eisentraut
On 9/21/17 14:58, Tom Lane wrote: > I've just been going through their git commit log to see what else has > changed since tzcode2017b, and I note that there are half a dozen other > portability-ish fixes. I think that some of them affect only code we > don't use, but I'm not sure that that's the

Re: [HACKERS] SCRAM in the PG 10 release notes

2017-09-22 Thread Peter Eisentraut
On 9/21/17 14:15, Jeff Janes wrote: > This looks good to me.  Might suggest adding verifying the clients as a > specific step:   > > "To upgrade an existing installation from md5 to scram-sha-256, verify > that all client software supports it, set password_encryption = > 'scram-sha-256' in

Re: [HACKERS] [PATCH] Generic type subscripting

2017-09-22 Thread Peter Eisentraut
On 9/21/17 11:24, Dmitry Dolgov wrote: > One last thing that I need to clarify. Initially there was an idea to > minimize changes in `pg_type` I see, but there is no value in that if it makes everything else more complicated. -- Peter Eisentraut http://www.2ndQuadrant.com/

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Claudio Freire
On Fri, Sep 22, 2017 at 4:46 AM, Kyotaro HORIGUCHI wrote: > I apologize in advance of possible silliness. > > At Thu, 21 Sep 2017 13:54:01 -0300, Claudio Freire > wrote in

Re: [HACKERS] visual studio 2017 build support

2017-09-22 Thread Andrew Dunstan
On 09/21/2017 08:16 PM, Haribabu Kommi wrote: > > > > > I was about to commit this after a good bit of testing when I > noticed this: > >     +   Building with Visual Studio 2017 is >     supported >     +   down to Windows 7 SP1 and Windows >     Server 2012 R2. > >

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-22 Thread Arseny Sher
Masahiko Sawada writes: > On Sun, Sep 17, 2017 at 2:01 AM, Masahiko Sawada > wrote: >> + >> + Since dropping a replication slot is not transactional, we cannot run >> + DROP SUBSCRIPTION inside a transaction block if >> dropping >> + the

Re: [HACKERS] Improve catcache/syscache performance.

2017-09-22 Thread Robert Haas
On Fri, Sep 22, 2017 at 2:15 AM, Andres Freund wrote: > This results in making cache lookups themselves roughly three times as > fast - full-system benchmarks obviously improve less than that. Wow. That's really good. -- Robert Haas EnterpriseDB:

Re: [HACKERS] Generate wait event list and docs from text file

2017-09-22 Thread Alvaro Herrera
Michael Paquier wrote: > On Fri, Sep 22, 2017 at 1:52 PM, Schneider wrote: > > Seems an apt occasion to point out that 10rc1 is missing documentation > > for a couple events. > Indeed, I can see as well that those are the three new ones between > 9.6 and 10. Attached is

Re: [HACKERS] Windows warnings from VS 2017

2017-09-22 Thread Andrew Dunstan
On 09/21/2017 09:41 PM, Andres Freund wrote: > On 2017-09-21 09:30:31 -0400, Tom Lane wrote: >> Andrew Dunstan writes: >>> The speed of memset is hardly going to be the dominating factor in a >>> 'CREATE DATABASE' command, so we could certainly afford to change

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-22 Thread Alexander Korotkov
On Thu, Sep 21, 2017 at 12:08 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Mon, Sep 18, 2017 at 12:41 PM, Daniel Gustafsson > wrote: > >> > On 16 Sep 2017, at 01:51, Alexander Korotkov >> wrote: >> > >> > On Tue, Sep 5, 2017 at 2:47

Re: [HACKERS] UPDATE of partition key

2017-09-22 Thread Amit Khandekar
On 21 September 2017 at 19:52, amul sul wrote: > On Wed, Sep 20, 2017 at 9:27 PM, Amit Khandekar > wrote: >> >> On 20 September 2017 at 00:06, Robert Haas wrote: >> > On Fri, Sep 15, 2017 at 7:25 AM, Amit Khandekar

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-09-22 Thread Peter Moser
2017-09-22 10:21 GMT+02:00 Pavel Stehule : > Currently Postgres has zero support for SQL:2011 temporal tables. Isn't > better start with already standard features than appends some without > standard? The standard has some concept and if we start out of this concept, >

Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-22 Thread Andreas Karlsson
On 09/21/2017 10:55 PM, Peter Geoghegan wrote: I agree, but the bigger issue is that we're *half way* between supporting only one format, and supporting two formats. AFAICT, there is no reason that we can't simply support one format on all ICU versions, and keep what ends up within pg_collation

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-22 Thread Ashutosh Bapat
On Fri, Sep 22, 2017 at 10:45 AM, Rafia Sabih wrote: >> >> On completing the benchmark for all queries for the above mentioned >> setup, following performance improvement can be seen, >> Query | Patch | Head >> 3 | 1455 | 1631 >> 4 | 499 | 4344 >> 5 | 1464

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Kyotaro HORIGUCHI
At Fri, 22 Sep 2017 17:21:04 +0900, Masahiko Sawada wrote in > On Fri, Sep 22, 2017 at 4:16 PM, Kyotaro HORIGUCHI > wrote: > > At Fri, 22 Sep 2017 15:00:20 +0900,

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Masahiko Sawada
On Fri, Sep 22, 2017 at 4:16 PM, Kyotaro HORIGUCHI wrote: > At Fri, 22 Sep 2017 15:00:20 +0900, Masahiko Sawada > wrote in >> On Tue, Sep 19, 2017 at 3:31 PM, Kyotaro

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-09-22 Thread Pavel Stehule
2017-09-22 10:15 GMT+02:00 Peter Moser : > 2017-09-22 10:06 GMT+02:00 Pavel Stehule : > > ANSI SQL 2011 has temporal data support > > > > https://www.slideshare.net/CraigBaumunk/temporal- > extensions-tosql20112012010438 > > As operations it only

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-09-22 Thread Peter Moser
2017-09-22 10:06 GMT+02:00 Pavel Stehule : > ANSI SQL 2011 has temporal data support > > https://www.slideshare.net/CraigBaumunk/temporal-extensions-tosql20112012010438 As operations it only supports temporal inner joins using the overlap predicate. Temporal aggregation,

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-09-22 Thread Pavel Stehule
2017-09-22 9:59 GMT+02:00 Peter Moser : > 2017-09-12 16:33 GMT+02:00 Simon Riggs : > > PostgreSQL tries really very hard to implement the SQL Standard and > > just the standard. ISTM that the feedback you should have been given > > is that this is very

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-09-22 Thread Peter Moser
2017-09-12 16:33 GMT+02:00 Simon Riggs : > PostgreSQL tries really very hard to implement the SQL Standard and > just the standard. ISTM that the feedback you should have been given > is that this is very interesting but will not be committed in its > current form; I am

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Kyotaro HORIGUCHI
I apologize in advance of possible silliness. At Thu, 21 Sep 2017 13:54:01 -0300, Claudio Freire wrote in

Re: [HACKERS] pg_stat_wal_write statistics view

2017-09-22 Thread Julien Rouhaud
Hello, On Wed, Sep 13, 2017 at 3:01 AM, Haribabu Kommi wrote: > I ran the latest performance tests with and without IO times, there is an > overhead involved with IO time calculation and didn't observe any > performance > overhead with normal stats. May be we can enable

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-09-22 Thread Masahiko Sawada
On Fri, Sep 22, 2017 at 3:46 PM, Michael Paquier wrote: > On Fri, Sep 22, 2017 at 3:24 PM, Masahiko Sawada > wrote: >> I have a question. Since WALInsertLockRelease seems not to call >> LWLockWaitForVar I thought you wanted to mean

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Kyotaro HORIGUCHI
At Fri, 22 Sep 2017 15:00:20 +0900, Masahiko Sawada wrote in > On Tue, Sep 19, 2017 at 3:31 PM, Kyotaro HORIGUCHI > wrote: > > I was just looking the thread since it is

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-09-22 Thread Michael Paquier
On Fri, Sep 22, 2017 at 3:24 PM, Masahiko Sawada wrote: > I have a question. Since WALInsertLockRelease seems not to call > LWLockWaitForVar I thought you wanted to mean LWLockReleaseClearVar > instead, is that right? This looks like a copy-pasto from my side. Thanks for

Re: [HACKERS] Generate wait event list and docs from text file

2017-09-22 Thread Michael Paquier
On Fri, Sep 22, 2017 at 1:52 PM, Schneider wrote: > Seems an apt occasion to point out that 10rc1 is missing documentation > for a couple events. Meh. Thanks for pointing this out. One more. > From src/backend/storage/lmgr/lwlocknames.txt: CLogTruncationLock was >

Re: [HACKERS] Partition-wise aggregation/grouping

2017-09-22 Thread Jeevan Chalke
On Thu, Sep 21, 2017 at 5:00 PM, Rajkumar Raghuwanshi < rajkumar.raghuwan...@enterprisedb.com> wrote: > Hi Jeevan, > > while testing latest v3 patches, I am getting a server crash if I reset > partition_wise_agg_cost_factor, please take a look. > > CREATE TABLE lp (a TEXT, b FLOAT, c INT)

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-09-22 Thread Masahiko Sawada
On Fri, Sep 22, 2017 at 3:00 PM, Michael Paquier wrote: > On Fri, Sep 22, 2017 at 11:34 AM, Masahiko Sawada > wrote: >> You're right. I updated the patch so that it exits do_pg_abort_backup >> if the state is NONE and setting the state to NONE

Re: [HACKERS] Improve catcache/syscache performance.

2017-09-22 Thread Andres Freund
Hi, On 2017-09-20 18:26:50 +0530, amul sul wrote: > Patch 0007: Thanks for looking! > 1: > 400 + /* > 401 +* XXX: might be worthwhile to only handle oid sysattr, to > reduce > 402 +* overhead - it's the most common key. > 403 +*/ > > IMHO, let fix that as well. I

Re: [HACKERS] Improve catcache/syscache performance.

2017-09-22 Thread Andres Freund
Hi, On 2017-09-13 23:12:07 -0700, Andres Freund wrote: > Attached is a patch that tries to improve sys/catcache performance, > going further than the patch referenced earlier. Here's a variant that cleans up the previous changes a bit, and adds some further improvements: Here's the main commit

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-09-22 Thread Masahiko Sawada
On Tue, Sep 19, 2017 at 3:31 PM, Kyotaro HORIGUCHI wrote: > I was just looking the thread since it is found left alone for a > long time in the CF app. > > At Mon, 18 Sep 2017 16:35:58 -0700, Peter Geoghegan wrote in >

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-09-22 Thread Michael Paquier
On Fri, Sep 22, 2017 at 11:34 AM, Masahiko Sawada wrote: > You're right. I updated the patch so that it exits do_pg_abort_backup > if the state is NONE and setting the state to NONE in > do_pg_stop_backup before releasing the WAL insert lock. -/* Clean up session-level