Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-04-05 Thread Pavel Stehule
2017-04-05 22:33 GMT+02:00 Andres Freund : > Hi, > > > I'd like some input from other committers whether we want this. I'm > somewhat doubtful, but don't have particularly strong feelings. > > > > + > > + > > + Block level PRAGMA > > + > > + > > +PRAGMA > > +in

Re: [HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-04-05 Thread Pavel Stehule
2017-04-06 3:34 GMT+02:00 Stephen Frost : > Andres, > > * Andres Freund (and...@anarazel.de) wrote: > > On 2017-04-05 21:07:59 -0400, Stephen Frost wrote: > > > * Andres Freund (and...@anarazel.de) wrote: > > > > I don't yet have a good idea how to deal with moving individual

Re: [HACKERS] BRIN cost estimate

2017-04-05 Thread David Rowley
On 5 April 2017 at 17:34, Emre Hasegeli wrote: > >> Interested to hear comments on this. > > > I don't have chance to test it right now, but I am sure it would be an > improvement over what we have right now. There is no single correct > equation with so many unknowns we have.

Re: [HACKERS] SCRAM authentication, take three

2017-04-05 Thread Noah Misch
On Tue, Mar 07, 2017 at 02:36:13PM +0200, Heikki Linnakangas wrote: > I didn't include the last-minute changes to the way you specify this in > pg_hba.conf. So it's still just "scram". I agree in general that we should > think about how to extend that too, but I think the proposed syntax was >

Re: [HACKERS] CREATE/ALTER ROLE PASSWORD ('value' USING 'method')

2017-04-05 Thread Noah Misch
On Fri, Mar 17, 2017 at 10:10:59AM +0900, Michael Paquier wrote: > On Fri, Mar 17, 2017 at 2:30 AM, Jeff Janes wrote: > > On Thu, Mar 9, 2017 at 4:59 AM, Michael Paquier > > wrote: > >> > >> On Thu, Mar 9, 2017 at 1:17 AM, Joe Conway

Re: [HACKERS] Fast Default WIP patch for discussion

2017-04-05 Thread Serge Rielau
Andres, Yes, I still want to push this in. However I have not had time to get back to it. I’m embarrassed to say that I don’t even know where the comments that were issued occurred. Cheers Serge via Newton Mail [https://cloudmagic.com/k/d/mailapp?ct=dx=9.4.52=10.11.6=email_footer_2] On Wed,

Re: [HACKERS] Changing references of password encryption to hashing

2017-04-05 Thread Noah Misch
On Thu, Mar 16, 2017 at 07:27:11AM -0700, Joe Conway wrote: > On 03/16/2017 06:19 AM, Robert Haas wrote: > > On Mon, Mar 13, 2017 at 4:48 AM, Craig Ringer wrote: > >> So I'm in favour of fixing the docs but I'm not keen on changing the > >> SQL syntax in a way that just

Re: [HACKERS] Multiple false-positive warnings from Valgrind

2017-04-05 Thread Noah Misch
On Wed, Mar 29, 2017 at 12:34:52PM +0900, Michael Paquier wrote: > On Thu, Mar 23, 2017 at 5:15 PM, Michael Paquier > wrote: > > On Tue, Mar 21, 2017 at 10:57 PM, Aleksander Alekseev > > wrote: > >> Recently I've decided to run PostgreSQL

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-05 Thread Amit Langote
On 2017/04/06 13:08, Keith Fiske wrote: > On Wed, Apr 5, 2017 at 2:51 PM, Keith Fiske wrote: >> Only issue I see with this, and I'm not sure if it is an issue, is what >> happens to that default constraint clause when 1000s of partitions start >> getting added? From what I gather the default's

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-05 Thread Rushabh Lathia
On 2017/04/06 0:19, Robert Haas wrote: > On Wed, Apr 5, 2017 at 5:57 AM, Rahila Syed wrote: >>> Could you briefly elaborate why you think the lack global index support >>> would be a problem in this regard? >> I think following can happen if we allow rows satisfying the

Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.

2017-04-05 Thread Ashutosh Sharma
Hi, >> >> Based on the earlier discussions, I have prepared a patch that would >> allow pgstathashindex() to show the number of unused pages in hash >> index. Please find the attached patch for the same. Thanks. > > My idea is that we shouldn't end up with both a zero_pages column and > an

[HACKERS] Re: Letting the client choose the protocol to use during a SASL exchange

2017-04-05 Thread Noah Misch
On Tue, Apr 04, 2017 at 03:02:30PM +0900, Michael Paquier wrote: > There is still one open item pending for SCRAM that has not been > treated which is mentioned here: > https://www.postgresql.org/message-id/b081887e-1712-3aa4-7dbe-e012333d5...@iki.fi > > When doing an authentication with SASL,

Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-04-05 Thread Kyotaro HORIGUCHI
At Thu, 06 Apr 2017 00:59:49 +0200, Pierre Ducroquet wrote in <2008148.rxBNyNRHPZ@peanuts2> > But it all gets messy when we want to create a streaming standby server using > pg_basebackup. When backuping Pg 9.5, there is no issue, but backuping Pg 9.6 > afterwards will say

Re: [HACKERS] parallel bitmapscan isn't exercised in regression tests

2017-04-05 Thread Dilip Kumar
On Tue, Apr 4, 2017 at 5:51 AM, Dilip Kumar wrote: > Sure I can do that, In attached patch, I only fixed the problem of not > executing the bitmap test. Now, I will add few cases to cover other > parts especially rescan and prefetching logic. I have added two test cases

Re: [HACKERS] Faster methods for getting SPI results (460% improvement)

2017-04-05 Thread Jim Nasby
On 4/5/17 9:08 PM, Craig Ringer wrote: ... which I can't reproduce now. Even though I cleared ccache and "git reset -fdx" before I ran the above and got the crash. Glad to hear that, since I can't repro at all. :) Assume it's a local system peculiarity. If I can reproduce again I'll dig into

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-05 Thread Keith Fiske
On Wed, Apr 5, 2017 at 2:51 PM, Keith Fiske wrote: > > > Only issue I see with this, and I'm not sure if it is an issue, is what > happens to that default constraint clause when 1000s of partitions start > getting added? From what I gather the default's constraint is built

Re: [HACKERS] Faster methods for getting SPI results (460% improvement)

2017-04-05 Thread Craig Ringer
On 6 April 2017 at 11:46, Craig Ringer wrote: > On 6 April 2017 at 09:40, Jim Nasby wrote: >> On 4/4/17 7:44 PM, Craig Ringer wrote: >>> >>> The patch crashes in initdb with --enable-cassert builds: >> >> >> Thanks for the review! I'll get to the

Re: [HACKERS] Faster methods for getting SPI results (460% improvement)

2017-04-05 Thread Jim Nasby
On 4/5/17 7:44 PM, Jim Nasby wrote: Updated patches attached, but I still need to update the docs. Attached is a complete series of patches that includes the docs patch. Right now, the docs don't include a concrete example, because adding one would be a pretty large if it demonstrated real

Re: [HACKERS] Faster methods for getting SPI results (460% improvement)

2017-04-05 Thread Craig Ringer
On 6 April 2017 at 09:40, Jim Nasby wrote: > On 4/4/17 7:44 PM, Craig Ringer wrote: >> >> The patch crashes in initdb with --enable-cassert builds: > > > Thanks for the review! I'll get to the rest of it in a bit, but I'm unable > to reproduce the initdb failure. I looked

Re: [HACKERS] Faster methods for getting SPI results (460% improvement)

2017-04-05 Thread Jim Nasby
On 4/4/17 7:44 PM, Craig Ringer wrote: On 5 April 2017 at 08:23, Craig Ringer wrote: On 5 April 2017 at 08:00, Craig Ringer wrote: This patch fails to update the documentation at all. https://www.postgresql.org/docs/devel/static/spi.html I'll

[HACKERS] Interval for launching the table sync worker

2017-04-05 Thread Masahiko Sawada
Hi all, While testing table sync worker for logical replication I noticed that if the table sync worker of logical replication failed to insert the data for whatever reason, the table sync worker process exits with error. And then the main apply worker launches the table sync worker again soon

Re: [HACKERS] Parallel Append implementation

2017-04-05 Thread Andres Freund
On 2017-04-05 14:52:38 +0530, Amit Khandekar wrote: > This is what the earlier versions of my patch had done : just add up > per-subplan parallel_workers (1 for non-partial subplan and > subpath->parallel_workers for partial subplans) and set this total as > the Append parallel_workers. I don't

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-05 Thread Noah Misch
On Wed, Apr 05, 2017 at 12:16:25AM -0700, Andres Freund wrote: > On 2017-04-05 02:47:55 -0400, Noah Misch wrote: > > On Fri, Mar 10, 2017 at 11:49:46AM -0800, Andres Freund wrote: > > > On 2017-03-09 13:34:22 -0500, Robert Haas wrote: > > > > On Mon, Jan 30, 2017 at 6:54 PM, Tom Lane

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-05 Thread Noah Misch
On Thu, Apr 06, 2017 at 12:48:56AM +0900, Fujii Masao wrote: > On Wed, Apr 5, 2017 at 3:45 PM, Noah Misch wrote: > > On Mon, Dec 19, 2016 at 09:49:58PM +0900, Fujii Masao wrote: > >> Regarding this feature, there are some loose ends. We should work on > >> and complete them

Re: [HACKERS] Faster methods for getting SPI results (460% improvement)

2017-04-05 Thread Jim Nasby
On 4/4/17 7:44 PM, Craig Ringer wrote: The patch crashes in initdb with --enable-cassert builds: Thanks for the review! I'll get to the rest of it in a bit, but I'm unable to reproduce the initdb failure. I looked at the assert line and I don't see anything obvious either. :/ Can you send

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-04-05 Thread Pavan Deolasee
On Thu, Apr 6, 2017 at 1:06 AM, Robert Haas wrote: > On Wed, Apr 5, 2017 at 2:32 PM, Pavan Deolasee > wrote: > > > The other way is to pass old tuple values along with the new tuple > values to > > amwarminsert, build index tuples and then do a

Re: [HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-04-05 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > On 2017-04-05 21:07:59 -0400, Stephen Frost wrote: > > * Andres Freund (and...@anarazel.de) wrote: > > > I don't yet have a good idea how to deal with moving individual cells > > > into files, so they can be loaded. One approach would be to

Re: [HACKERS] Logical Replication and Character encoding

2017-04-05 Thread Kyotaro HORIGUCHI
At Wed, 5 Apr 2017 11:33:51 -0400, Peter Eisentraut wrote in <5401fef6-c0c0-7e8a-d8b1-169e30cbd...@2ndquadrant.com> > After further thinking, I prefer the alternative approach of using > pq_sendcountedtext() as is and sticking the trailing zero byte on on the >

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

2017-04-05 Thread Noah Misch
On Wed, Apr 05, 2017 at 11:13:33AM -0400, Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Stephen Frost writes: > > > I'm all for adding tests into pg_dump which do things like drop columns > > > and change column names and other cases which could impact if

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-04-05 Thread Robert Haas
On Wed, Apr 5, 2017 at 8:17 PM, Neha Khatri wrote: > The problem here seem to be the change in the max_parallel_workers value > while the parallel workers are still under execution. So this poses two > questions: > > 1. From usecase point of view, why could there be a need

Re: [HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-04-05 Thread Andres Freund
Hi, On 2017-04-05 21:07:59 -0400, Stephen Frost wrote: > * Andres Freund (and...@anarazel.de) wrote: > > I don't like the API here much. Loading requires knowledge of some > > magic $1 value and allows only a single column, printing doesn't mean > > much when there's multiple columns / rows. >

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-05 Thread Amit Langote
On 2017/04/06 0:19, Robert Haas wrote: > On Wed, Apr 5, 2017 at 5:57 AM, Rahila Syed wrote: >>> Could you briefly elaborate why you think the lack global index support >>> would be a problem in this regard? >> I think following can happen if we allow rows satisfying the

Re: [HACKERS] [COMMITTERS] pgsql: Collect and use multi-column dependency stats

2017-04-05 Thread David Rowley
On 6 April 2017 at 13:05, David Rowley wrote: > I tested with the attached, and it does not seem to hurt planner > performance executing: Here's it again, this time with a comment on the find_relation_from_clauses() function. -- David Rowley

Re: [HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-04-05 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > I don't like the API here much. Loading requires knowledge of some > magic $1 value and allows only a single column, printing doesn't mean > much when there's multiple columns / rows. > I think the loading side of things should be redesigned

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

2017-04-05 Thread Robert Haas
On Wed, Apr 5, 2017 at 2:42 AM, Ashutosh Bapat wrote: > Only inner join conditions have equivalence classes associated with > those. Outer join conditions create single element equivalence > classes. So, we can not associate equivalence classes as they are with >

Re: [HACKERS] [COMMITTERS] pgsql: Collect and use multi-column dependency stats

2017-04-05 Thread David Rowley
On 6 April 2017 at 11:33, Tom Lane wrote: > David Rowley writes: >> On 6 April 2017 at 10:48, Tom Lane wrote: >>> The buildfarm is unhappy about the fact that this changed the API >>> for clauselist_selectivity(). I am not

Re: [HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-04-05 Thread Andres Freund
On 2017-03-18 17:51:48 +0100, Pavel Stehule wrote: > What is done: > > create table foo foo(a bytea); > > -- import > insert into foo values($1) > \gloadfrom ~/xxx.jpg bytea > > -- export > \pset format binary > select a from foo > \g ~/xxx2.jpg > > tested on import 55MB binary file > >

Re: [HACKERS] pgbench - allow to store select results into variables

2017-04-05 Thread Tatsuo Ishii
> Well, personally, as an all-ASCII guy I'm not too fussed about that, > but I can see that other people might be annoyed. > > The main problem in dealing with it seems to be whether you're willing > to support pgbench running in non-backend-safe encodings (eg SJIS). > If we rejected that case

Re: [HACKERS] pgbench - allow to store select results into variables

2017-04-05 Thread Andres Freund
On 2017-04-05 20:24:19 -0400, Tom Lane wrote: > Having said all that, I think we're at the point in the commitfest > where if there's any design question at all about a patch, it should > get booted to the next cycle. We are going to have more than enough > to do to stabilize what's already

Re: [HACKERS] pgbench - allow to store select results into variables

2017-04-05 Thread Tom Lane
Tatsuo Ishii writes: > I still wonder whether I should commit this or not because this patch > does not allow none ascii column names. Well, personally, as an all-ASCII guy I'm not too fussed about that, but I can see that other people might be annoyed. The main problem in

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-04-05 Thread Neha Khatri
On Wed, Apr 5, 2017 at 5:34 PM, Kuntal Ghosh wrote: > On Tue, Apr 4, 2017 at 12:16 PM, Neha Khatri > wrote: > > > I feel there should be an assert if > > (BackgroundWorkerData->parallel_register_count - > >

Re: [HACKERS] pgbench - allow to store select results into variables

2017-04-05 Thread Tatsuo Ishii
Tom and others, I still wonder whether I should commit this or not because this patch does not allow none ascii column names. We know pgbench variable name has been restricted since the functionality was born. When users explicitly define a pgbench variable using \set, it is not a too strong

Re: [HACKERS] Fast Default WIP patch for discussion

2017-04-05 Thread Andres Freund
Hi Serge, On 2016-10-28 08:28:11 -0700, Serge Rielau wrote: > Time for me to dig into that then. Are you planning to update your POC at some point? This'd be a very welcome improvement. Regards, Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] pgbench more operators & functions

2017-04-05 Thread Andres Freund
Hi, On 2017-03-16 12:21:31 -0400, David Steele wrote: > Any reviewers want to have a look? Unfortunately there wasn't much of that. I think that this patch atm doesn't have sufficient design agreement to be considered for v10. As the current CF has formally ended, I think we'll have to punt

Re: [HACKERS] [COMMITTERS] pgsql: Collect and use multi-column dependency stats

2017-04-05 Thread Tom Lane
David Rowley writes: > On 6 April 2017 at 10:48, Tom Lane wrote: >> The buildfarm is unhappy about the fact that this changed the API >> for clauselist_selectivity(). I am not convinced that that change >> was a good idea, so before telling FDW

Re: [HACKERS] LWLock optimization for multicore Power machines

2017-04-05 Thread Tom Lane
Andres Freund writes: > On 2017-04-03 11:56:13 -0700, Andres Freund wrote: >> Have you done x86 benchmarking? > I think unless such benchmarking is done in the next 24h we need to move > this patch to the next CF... In theory, inlining the _impl function should lead to

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

2017-04-05 Thread Andres Freund
Hi, On 2017-03-30 14:11:28 +0200, Peter Moser wrote: > 2017-03-01 10:56 GMT+01:00 Peter Moser : > > A similar walkthrough for ALIGN will follow soon. > > > > We are thankful for any suggestion or ideas, to be used to write a > > good SGML documentation. > > The attached

Re: [HACKERS] PATCH: recursive json_populate_record()

2017-04-05 Thread Andrew Dunstan
On 04/04/2017 05:18 PM, Andrew Dunstan wrote: > > On 04/03/2017 05:17 PM, Andres Freund wrote: >> On 2017-03-21 14:31:08 -0400, Andrew Dunstan wrote: >>> On 03/21/2017 01:37 PM, David Steele wrote: On 3/16/17 11:54 AM, David Steele wrote: > On 2/1/17 12:53 AM, Michael Paquier wrote:

Re: [HACKERS] [COMMITTERS] pgsql: Collect and use multi-column dependency stats

2017-04-05 Thread David Rowley
On 6 April 2017 at 10:48, Tom Lane wrote: > Simon Riggs writes: >> Collect and use multi-column dependency stats > > The buildfarm is unhappy about the fact that this changed the API > for clauselist_selectivity(). I am not convinced that that change >

Re: [HACKERS] LWLock optimization for multicore Power machines

2017-04-05 Thread Andres Freund
Hi, On 2017-04-03 11:56:13 -0700, Andres Freund wrote: > > > +/* > > + * Generic implementation of pg_atomic_fetch_mask_add_u32() via loop > > + * of compare & exchange. > > + */ > > +static inline uint32 > > +pg_atomic_fetch_mask_add_u32_impl(volatile pg_atomic_uint32 *ptr, > > +

Re: [HACKERS] [GENERAL] C++ port of Postgres

2017-04-05 Thread Andres Freund
Hi Peter, On 2017-02-28 22:30:16 -0800, Andres Freund wrote: > On 2017-02-28 23:42:45 -0500, Peter Eisentraut wrote: > > On 1/26/17 22:46, Andres Freund wrote: > > > On 2016-09-30 15:24:09 -0400, Peter Eisentraut wrote: > > >> Yeah, I have committed a few of the patches now and I'll close the CF

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

2017-04-05 Thread Andres Freund
Hi, On 2017-03-11 13:06:13 +0100, Pavel Stehule wrote: > 2017-03-10 15:45 GMT+01:00 Alexander Korotkov : > > > On Fri, Mar 10, 2017 at 5:10 PM, Peter Eisentraut < > > peter.eisentr...@2ndquadrant.com> wrote: > > > >> On 2/24/17 16:32, Pavel Stehule wrote: > >> >

Re: [HACKERS] scram and \password

2017-04-05 Thread Michael Paquier
On Thu, Apr 6, 2017 at 2:11 AM, Heikki Linnakangas wrote: > At a quick glance, moving pg_frontend_random() to src/common looks like a > non-starter. It uses pglock_thread() which is internal to libpq, so it won't > compile as it is. I think I'm going to change

Re: [HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-04-05 Thread Andres Freund
Hi, On 2017-03-18 17:51:48 +0100, Pavel Stehule wrote: > What is done: > > create table foo foo(a bytea); > > -- import > insert into foo values($1) > \gloadfrom ~/xxx.jpg bytea > > -- export > \pset format binary > select a from foo > \g ~/xxx2.jpg > > tested on import 55MB binary file > >

[HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-04-05 Thread Pierre Ducroquet
Hi On our servers, we are running different PostgreSQL versions because we can not migrate every application at the same time to Pg 9.6… Since we have several disks, we use tablespaces and, for historical reasons, we used the same folder for both Pg versions, say /mnt/ssd/postgres The server

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-04-05 Thread Andres Freund
Hi, On 2017-04-02 22:28:40 +0200, Jan Michálek wrote: > 2017-03-23 17:26 GMT+01:00 Pierre Ducroquet : > > The new status of this patch is: Waiting on Author > > > > Corrected problem with \pset linestyle when format is set to markdown, or > rst. > > Corrected tuples only

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-04-05 Thread Andres Freund
Hi, On 2017-04-01 03:05:07 +0900, Masahiko Sawada wrote: > On Fri, Mar 31, 2017 at 11:44 PM, Robert Haas wrote: > [ lots of valuable discussion ] I think this patch clearly still is in the design stage, and has received plenty feedback this CF. I'll therefore move this

Re: [HACKERS] [COMMITTERS] pgsql: Collect and use multi-column dependency stats

2017-04-05 Thread Tom Lane
Simon Riggs writes: > Collect and use multi-column dependency stats The buildfarm is unhappy about the fact that this changed the API for clauselist_selectivity(). I am not convinced that that change was a good idea, so before telling FDW authors that they need to change

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

2017-04-05 Thread Michael Paquier
On Wed, Apr 5, 2017 at 10:24 PM, Stephen Frost wrote: > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> 1) Initialize the old cluster and start it. >> 2) create a bunch of databases with full range of ascii characters. >> 3) Run regression tests. >> 4) Take dump on old

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-04-05 Thread Andres Freund
Hi, On 2017-04-05 17:00:42 +1000, Vaishnavi Prabakaran wrote: > Regarding test patch, I have corrected the test suite after David Steele's > comments. > Also, I would like to mention that a companion patch was submitted by David > Steele up-thread. > > Attached the latest code and test patch.

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-04-05 Thread Andres Freund
On 2017-03-13 18:45:00 +0530, Mithun Cy wrote: > I have implemented a similar logic now. The prewarm bgworker will > launch a sub-worker per database in the dump file. And, each > sub-worker will load its database block info. The sub-workers will be > launched only after previous one is finished.

Re: [HACKERS] multivariate statistics (v25)

2017-04-05 Thread David Rowley
On 6 April 2017 at 10:17, Simon Riggs wrote: > On 5 April 2017 at 10:47, David Rowley wrote: > >> I've attached an updated patch to address Tomas' concerns and yours too. > > Commited, with some doc changes and additions based upon my

Re: [HACKERS] multivariate statistics (v25)

2017-04-05 Thread Simon Riggs
On 5 April 2017 at 10:47, David Rowley wrote: > I've attached an updated patch to address Tomas' concerns and yours too. Commited, with some doc changes and additions based upon my explorations. For the record, I measured the time to calc extended statistics as

Re: [HACKERS] multivariate statistics (v25)

2017-04-05 Thread David Rowley
On 6 April 2017 at 07:19, Tels wrote: > I know I'm a bit late, but isn't the syntax backwards? > > "CREATE STATISTICS s1 WITH (dependencies) ON (col_a, col_b) FROM table;" > > These do it the other way round: > > CREATE INDEX idx ON table (col_a); > > AND: > >

Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-04-05 Thread Andres Freund
On 2017-04-05 17:22:34 -0400, Tom Lane wrote: > Andres Freund writes: > > I'd like some input from other committers whether we want this. I'm > > somewhat doubtful, but don't have particularly strong feelings. > > I don't really want to expose the workings of the plancache

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-05 Thread Mike Palmiotto
On Wed, Apr 5, 2017 at 1:22 PM, Mike Palmiotto wrote: > On Wed, Apr 5, 2017 at 1:19 PM, Tom Lane wrote: >> Peter Eisentraut writes: >>> On 4/5/17 12:04, Tom Lane wrote: Conclusion: Fedora's gcc is playing

Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-04-05 Thread Tom Lane
Andres Freund writes: > I'd like some input from other committers whether we want this. I'm > somewhat doubtful, but don't have particularly strong feelings. I don't really want to expose the workings of the plancache at user level. The heuristics it uses certainly need

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-04-05 Thread Pavel Stehule
2017-03-17 4:23 GMT+01:00 Noah Misch : > On Sun, Mar 12, 2017 at 10:26:33PM +0100, Pavel Stehule wrote: > > 2017-03-12 21:57 GMT+01:00 Noah Misch : > > > On Sun, Mar 12, 2017 at 08:36:58PM +0100, Pavel Stehule wrote: > > > > 2017-03-12 0:56 GMT+01:00 Noah

Re: [HACKERS] pg_stat_wal_write statistics view

2017-04-05 Thread Andres Freund
Hi, On 2017-03-30 13:10:41 +1100, Haribabu Kommi wrote: > diff --git a/src/backend/access/transam/xlog.c > b/src/backend/access/transam/xlog.c > index 5d58f09..a29c108 100644 > --- a/src/backend/access/transam/xlog.c > +++ b/src/backend/access/transam/xlog.c > @@ -600,6 +600,9 @@ typedef struct

Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-04-05 Thread Andres Freund
Hi, I'd like some input from other committers whether we want this. I'm somewhat doubtful, but don't have particularly strong feelings. > + > + > + Block level PRAGMA > + > + > +PRAGMA > +in PL/pgSQL > + > + > + > +The block level PRAGMA allows to change the > +

Re: [HACKERS] PG_GETARG_GISTENTRY?

2017-04-05 Thread Mark Dilger
> On Apr 5, 2017, at 1:12 PM, Tom Lane wrote: > > Mark Dilger writes: >> I have written a patch to fix these macro definitions across src/ and >> contrib/. >> Find the patch, attached. All regression tests pass on my Mac laptop. > > Thanks for

Re: [HACKERS] PG_GETARG_GISTENTRY?

2017-04-05 Thread Tom Lane
Mark Dilger writes: > I have written a patch to fix these macro definitions across src/ and > contrib/. > Find the patch, attached. All regression tests pass on my Mac laptop. Thanks for doing the legwork on that. This seems a bit late for v10, especially since it's

Re: [HACKERS] PG_GETARG_GISTENTRY?

2017-04-05 Thread Mark Dilger
> On Apr 5, 2017, at 9:23 AM, Tom Lane wrote: > > Robert Haas writes: >> On Wed, Mar 29, 2017 at 11:54 PM, Tom Lane wrote: >>> Andres Freund writes: we have a good number of '(GISTENTRY *)

Re: [HACKERS] increasing the default WAL segment size

2017-04-05 Thread Simon Riggs
On 5 April 2017 at 08:36, Peter Eisentraut wrote: > On 4/5/17 06:04, Beena Emerson wrote: >> I suggest the next step is to dial up the allowed segment size in >> configure and run some tests about what a reasonable maximum value could >> be. I did a

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-04-05 Thread Robert Haas
On Wed, Apr 5, 2017 at 2:32 PM, Pavan Deolasee wrote: >> The only other idea that I have for a really clean solution here is to >> support this only for index types that are amcanreturn, and actually >> compare the value stored in the index tuple with the one stored in

Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.

2017-04-05 Thread Robert Haas
On Thu, Mar 23, 2017 at 1:54 PM, Ashutosh Sharma wrote: >> Yeah, but I think "unused" might be better. Because a page could be >> in use (as an overflow page or primary bucket page) and still be >> empty. > > Based on the earlier discussions, I have prepared a patch that

Re: [HACKERS] multivariate statistics (v25)

2017-04-05 Thread Tels
Moin, On Wed, April 5, 2017 2:52 pm, Simon Riggs wrote: > On 5 April 2017 at 10:47, David Rowley > wrote: > >>> I have some other comments. > > Me too. > > > CREATE STATISTICS should take ShareUpdateExclusiveLock like ANALYZE. > > This change is in line with other

Re: [HACKERS] New SQL counter statistics view (pg_stat_sql)

2017-04-05 Thread Andres Freund
Hi, I'm somewhat inclined to think that this really would be better done in an extension like pg_stat_statements. On 2017-03-08 14:39:23 +1100, Haribabu Kommi wrote: > On Wed, Feb 1, 2017 at 3:13 PM, Michael Paquier > + > + track_sql (boolean) > + >

Re: [HACKERS] multivariate statistics (v25)

2017-04-05 Thread Simon Riggs
On 5 April 2017 at 10:47, David Rowley wrote: >> I have some other comments. Me too. CREATE STATISTICS should take ShareUpdateExclusiveLock like ANALYZE. This change is in line with other changes in this and earlier releases. Comments and docs included. Patch

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-05 Thread Keith Fiske
On Wed, Apr 5, 2017 at 11:19 AM, Robert Haas wrote: > On Wed, Apr 5, 2017 at 5:57 AM, Rahila Syed > wrote: > >>Could you briefly elaborate why you think the lack global index support > >>would be a problem in this regard? > > I think following can

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-04-05 Thread Peter Geoghegan
On Wed, Apr 5, 2017 at 11:27 AM, Andres Freund wrote: > I propose we move this patch to the next CF. I agree. I think it's too late to be working out fine details around TOAST like this. This is a patch that touches the storage format in a fairly fundamental way. The idea of

Re: [HACKERS] pgbench - allow to store select results into variables

2017-04-05 Thread Fabien COELHO
Hello Tatsuo-san, It seems the new feature \gset doesn't work with tables having none ascii column names: Indeed. The same error is triggered with the \set syntax, which does not involve any query execution. I have added a sentence mentionning the restriction when variables are first

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-04-05 Thread Andres Freund
On 2017-04-05 09:36:47 -0400, Robert Haas wrote: > By the way, the "Converting WARM chains back to HOT chains" section of > README.WARM seems to be out of date. Any chance you could update that > to reflect the current state and thinking of the patch? I propose we move this patch to the next CF.

Re: [HACKERS] [pgsql-www] Small issue in online devel documentation build

2017-04-05 Thread Robert Haas
On Wed, Apr 5, 2017 at 2:18 PM, Fabien COELHO wrote: >>> [Action required within three days. This is a generic notification.] >> >> >> I will work on this next week. I believe I will be able to provide a >> patch for the web site CSS by April 12, but ultimate success will

Re: [HACKERS] pageinspect and hash indexes

2017-04-05 Thread Robert Haas
On Fri, Mar 24, 2017 at 3:44 PM, Ashutosh Sharma wrote: > Agreed. Moreover, previous approach might even change the current > behaviour of functions like hash_page_items() and hash_page_stats() > basically when we pass UNUSED pages to these functions. Attached is > the

Re: [HACKERS] [pgsql-www] Small issue in online devel documentation build

2017-04-05 Thread Fabien COELHO
(https://wiki.postgresql.org/wiki/PostgreSQL_10_Open_Items#Documentation_tool_chain) [Action required within three days. This is a generic notification.] I will work on this next week. I believe I will be able to provide a patch for the web site CSS by April 12, but ultimate success will

Re: [HACKERS] Use American English spelling in pg_waldump error message

2017-04-05 Thread Peter Eisentraut
On 3/29/17 07:10, Daniel Gustafsson wrote: > We use “unrecognize” rather than “unrecognise” in all other error messages in > the tree, the attached patch fixes the one place where the latter spelling was > used. Committed, and I fixed a couple of code comments similarly. -- Peter Eisentraut

Re: [HACKERS] [pgsql-www] Small issue in online devel documentation build

2017-04-05 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 4/5/17 02:56, Noah Misch wrote: > > On Thu, Mar 23, 2017 at 11:21:39PM -0400, Peter Eisentraut wrote: > >> I think the fix belongs into the web site CSS, so there is nothing to > >> commit into PostgreSQL here. I will close

Re: [HACKERS] [pgsql-www] Small issue in online devel documentation build

2017-04-05 Thread Peter Eisentraut
On 4/5/17 02:56, Noah Misch wrote: > On Thu, Mar 23, 2017 at 11:21:39PM -0400, Peter Eisentraut wrote: >> I think the fix belongs into the web site CSS, so there is nothing to >> commit into PostgreSQL here. I will close the commit fest entry, but I >> have added a section to the open items list

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-05 Thread Mike Palmiotto
On Wed, Apr 5, 2017 at 1:19 PM, Tom Lane wrote: > Peter Eisentraut writes: >> On 4/5/17 12:04, Tom Lane wrote: >>> Conclusion: Fedora's gcc is playing fast and loose somehow with the >>> command "#include "; that does not include the file >>>

Re: [HACKERS] logical replication and SIGHUP

2017-04-05 Thread Peter Geoghegan
On Wed, Apr 5, 2017 at 10:21 AM, Fujii Masao wrote: > Both launcher and worker don't handle SIGHUP signal and cannot > reload the configuration. I think that this is a bug. +1 -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

[HACKERS] logical replication and SIGHUP

2017-04-05 Thread Fujii Masao
Hi, Both launcher and worker don't handle SIGHUP signal and cannot reload the configuration. I think that this is a bug. Will add this as an open item barring objection. Regards, -- Fujii Masao -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-05 Thread Tom Lane
Peter Eisentraut writes: > On 4/5/17 12:04, Tom Lane wrote: >> Conclusion: Fedora's gcc is playing fast and loose somehow with the >> command "#include "; that does not include the file >> you'd think it does, it does something magic inside the compiler. >> The

Re: [HACKERS] scram and \password

2017-04-05 Thread Heikki Linnakangas
On 04/05/2017 06:53 PM, Robert Haas wrote: On Sat, Mar 25, 2017 at 1:10 AM, Michael Paquier wrote: On Fri, Mar 24, 2017 at 10:12 PM, Heikki Linnakangas wrote: On 03/24/2017 03:02 PM, Michael Paquier wrote: In order to close this thread, I propose

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-05 Thread Peter Eisentraut
On 4/5/17 12:04, Tom Lane wrote: > Conclusion: Fedora's gcc is playing fast and loose somehow with the > command "#include "; that does not include the file > you'd think it does, it does something magic inside the compiler. > The magic evidently includes not complaining about duplicate macro >

Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256

2017-04-05 Thread Heikki Linnakangas
On 04/05/2017 07:23 AM, Michael Paquier wrote: fore On Wed, Apr 5, 2017 at 7:05 AM, Heikki Linnakangas wrote: I will continue tomorrow, but I wanted to report on what I've done so far. Attached is a new patch version, quite heavily modified. Notable changes so far: Great,

Re: [HACKERS] Functions Immutable but not parallel safe?

2017-04-05 Thread Tom Lane
Peter Eisentraut writes: > On 4/5/17 09:58, Robert Haas wrote: >>> - Maybe add a check to opr_sanity to make sure the default set of >>> functions is configured the way we want? >> That seems like a good idea. > patch Looks sane to me, although I wonder if

Re: [HACKERS] Functions Immutable but not parallel safe?

2017-04-05 Thread Robert Haas
On Wed, Apr 5, 2017 at 12:18 PM, Peter Eisentraut wrote: > On 4/5/17 09:58, Robert Haas wrote: >>> - Maybe add a check to opr_sanity to make sure the default set of >>> functions is configured the way we want? >> That seems like a good idea. > > patch LGTM --

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-05 Thread Tom Lane
Andres Freund writes: > GCC generally doesn't warn about macro redefinitions, if both > definitions are equivalent. But they're *not* equivalent. c.h has #define true((bool) 1) whereas so far as I can see the definition is just #define true1 And if you put those

Re: [HACKERS] PG_GETARG_GISTENTRY?

2017-04-05 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 29, 2017 at 11:54 PM, Tom Lane wrote: >> Andres Freund writes: >>> we have a good number of '(GISTENTRY *) PG_GETARG_POINTER(n)' in our >>> code - looks a bit better & shorter to have

  1   2   3   >