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

2017-04-05 Thread Petr Jelinek
On 06/04/17 03:51, Noah Misch wrote: > 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 a

Re: [HACKERS] Interval for launching the table sync worker

2017-04-05 Thread Kyotaro HORIGUCHI
I was thinking the same. At Thu, 6 Apr 2017 11:33:22 +0900, Masahiko Sawada wrote in > 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 pro

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

2017-04-05 Thread Jan Michálek
2017-04-06 0:55 GMT+02:00 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 >

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

2017-04-05 Thread Heikki Linnakangas
On 04/06/2017 08:33 AM, Noah Misch wrote: 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 wrote: On 03/07/2017 08:29 PM, To

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

2017-04-05 Thread Pavel Stehule
2017-04-06 8:08 GMT+02:00 Pavel Stehule : > > > 2017-04-05 23:22 GMT+02:00 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 w

Re: [HACKERS] Outdated comments around HandleFunctionRequest

2017-04-05 Thread Heikki Linnakangas
On 04/05/2017 10:58 AM, Heikki Linnakangas wrote: On 04/05/2017 04:05 AM, Andres Freund wrote: PostgresMain() has the following blurb for fastpath functions: /* * Note: we may at this point be inside an aborted

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

2017-04-05 Thread Pavel Stehule
> > That echoes my perception - so let's move this to the next CF? It's not > like this patch has been pending for very long. > sure Regards Pavel > > - Andres >

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

2017-04-05 Thread Pavel Stehule
2017-04-05 23:22 GMT+02:00 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 heuristic

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

2017-04-05 Thread Kyotaro HORIGUCHI
At Thu, 6 Apr 2017 13:10:48 +1200, David Rowley wrote in > 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.

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 PL/pgSQL > > + >

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 cells > > > > into fi

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. > >> *indexTotalC

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 > over

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 wrote: > >> > On 03/07/2017 08:29 PM, Tom Lane wrote: > >> >>

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&cv=9.4.52&pv=10.11.6&source=email_footer_2

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 kind of papers over part of

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 under Valgrind according to wiki > >> description [1]. Lot

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 cons

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 new partition >> to lie aro

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 unused_

[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, the

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 "directory "/mnt/ssd/

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 to cover rescan, prefetch

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 based > off the cumulat

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 rest of it in a bit, but I'm unable >> to reproduc

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 us

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 at the assert line and I

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 fix that soon. missing newline Fixed. +/*

[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 wit

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 th

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 wrote: > > >

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 until the release. > >>

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 y

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 comparison. For duplicate > > index tuples, skip WA

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 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 > receiving side. This is a more lo

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 the > > > pg_dump is c

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 to tweak the > max_paral

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 new partition >> to lie aro

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 http://www.2ndQuadrant.com/ Postg

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 > partition scheme. If we could do t

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 convinced that that change >>> was a good idea, so before telling FDW au

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 > > Commen

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 the

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 commit

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 dealing with it seems

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 - > > BackgroundWorkerData->parallel_terminate_count) > max_parallel_workers) > > > Backen

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 limit

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 y

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 thi

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 authors that they need to >> change their code, I'd

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 exactly the same assembly

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 README explains the ALIGN

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 > was a good idea, so before telling FDW auth

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: > >> > set EXTENDED_DESCRIBE_SORT siz

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 scram_build_verifier() to take > a pr

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 > > C

[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 has

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 for markdown and rst (no

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 to the next commitfest.

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 their code, I'd like to

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 cluster. >> 4) Stop

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. My

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. A

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 explorations. Great. Thanks for committing! -- David Rowl

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 +800ms on 2 million row sample.

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: > >CREATE TABLE t ( > id INT RE

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 at user level. > The h

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 fast and loose somehow with the command "#include "; that does not include the fi

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 work, but it'll get hard

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 Misch : > > > Please add a test case. > I

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 X

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 > +PL/

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 doing the legwork on that. You are welcome.

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 only cosmetic, but please p

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 *) PG_GETARG_POINTER(n)' in our code - looks a bit better & shorter to have PG_GETARG_GISTENTRY(n

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 little bit of that, but somewhere 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 the >> heap tuple, ensuring

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 would > allow pgstathashi

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 changes in this and earlier > re

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) > + > + track_sql configura

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 ready to be applied directly bar

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 happen if we allow rows satisfying the new > par

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 turning WARM on or o

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 disc

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 likely >> depend on the

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 newer version of patch. Thi

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 l

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 s

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 >>> you'd think it does, it does something magic inside th

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 make changes to your su

  1   2   3   >