Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-21 Thread Haribabu Kommi
On Mon, Mar 21, 2016 at 2:00 PM, Alvaro Herrera wrote: > Haribabu Kommi wrote: > >> > Check. >> > >> > +} lookup_hba_line_context; >> > ^ but why TAB here? >> >> corrected. I am not sure why pg_indent is adding a tab here. > > It's because lookup_hba_line_context is not listed in typedefs.list

Re: [HACKERS] pam auth - add rhost item

2016-03-21 Thread Haribabu Kommi
On Wed, Mar 16, 2016 at 10:46 PM, Grzegorz Sampolski wrote: > Hi. > Can be, but as you mentioned OS resolver can be configured to not use > dns at all. So much more appropriate will be pam_try_hostname if we want > to be more accurately. > But for me pamusedns, pam_use_hostname or pam_try_hostname

Re: [HACKERS] Patch: fix lock contention for HASHHDR.mutex

2016-03-21 Thread Aleksander Alekseev
> This is the point where I think I am missing something about patch. > As far as I can understand, it uses the same freelist index > (freelist_idx) for allocating and putting back the entry, so I think > the chance of increment in one list and decrement in another is there > when the value of free

Re: [HACKERS] extend pgbench expressions with functions

2016-03-21 Thread Fabien COELHO
Bonjour Michaël, v39 is yet another rebase: 42 is in sight! What's up with v42? Is that your personal record? It is just a (geek) joke, see: https://en.wikipedia.org/wiki/42_%28number%29#Hitchhiker.27s_Guide_to_the_Galaxy It is the answer to the "Ultimate Question of Life, The Universe an

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-21 Thread Emre Hasegeli
Here are my comments about the operator class implementation: > + *implementation of quad-4d tree over boxes for SP-GiST. Isn't the whole thing actually 3D? > + * For example consider the case of intersection. No need for a new line after this. > + * A quadrant has bounds, but sp-gist ke

Re: [HACKERS] multivariate statistics v14

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 11:34 PM, Alvaro Herrera wrote: > ObjectProperty[] contains a comment that the ACL is "same as relation", > but is that still correct, given that now stats may be related to more > than one relation? Do we even know what the rules for ACLs on > cross-relation stats are? O

[HACKERS] latch usage and postmaster death

2016-03-21 Thread Andres Freund
Hi, a significant number of WaitLatch's in the backend currently don't check for postmaster death. That's imo wrong. E.g. SELECT pg_sleep(100); just continues to run. I think we should change most sites to error out in that case. I wonder if we shouldn't add another WL_ flag that automatically m

Re: [HACKERS] pam auth - add rhost item

2016-03-21 Thread Grzegorz Sampolski
Ok. So if no one objected to the evening - in my time zone ofcourse :) I will change pamusedns to pam_use_hostname. On 03/21/2016 08:43 AM, Haribabu Kommi wrote: > On Wed, Mar 16, 2016 at 10:46 PM, Grzegorz Sampolski wrote: >> Hi. >> Can be, but as you mentioned OS resolver can be configured to n

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alexander Korotkov
On Mon, Mar 21, 2016 at 9:34 AM, Abhijit Menon-Sen wrote: > At 2016-03-19 17:46:25 -0300, alvhe...@2ndquadrant.com wrote: > > > > I don't think the first patch is acceptable standalone -- we need both > > things together. > > OK. > > > But in reality, pg_depend handling is mixed up with other cha

Re: [HACKERS] multivariate statistics v14

2016-03-21 Thread Tomas Vondra
Hi, On 03/21/2016 10:34 AM, Robert Haas wrote: On Sun, Mar 20, 2016 at 11:34 PM, Alvaro Herrera wrote: ObjectProperty[] contains a comment that the ACL is "same as relation", but is that still correct, given that now stats may be related to more than one relation? Do we even know what the rul

[HACKERS] PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Aleksander Alekseev
Hello I was playing with CLang sanitizers[1][2][3][4] recently and discovered something disturbing regarding how PostgreSQL works. Here is an example. Lets create a breakpoint right before filling a CheckPoint structure: (gdb) b xlog.c:4772 Breakpoint 1 at 0x7ffbad0556d4: file xlog.c, line 4772.

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-21 Thread Andres Freund
Hi,m On 2016-03-21 11:26:43 +0530, Amit Kapila wrote: > LOG: database system was shut down at 2016-03-21 11:17:13 IST > LOG: MultiXact member wraparound protections are now enabled > LOG: database system is ready to accept connections > LOG: autovacuum launcher started > FATAL: failed to set

Re: [HACKERS] multivariate statistics v14

2016-03-21 Thread Tomas Vondra
On 03/21/2016 04:34 AM, Alvaro Herrera wrote: Another skim on 0002: reference.sgml is missing a call to &alterStatistic. ObjectProperty[] contains a comment that the ACL is "same as relation", but is that still correct, given that now stats may be related to more than one relation? Do we even

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Artur Zakirov
I tried to find some bugs in the code. I can't find them. But it does not mean that there are not bugs. Still there are a lack of comments and trailing whitespaces. On 16.03.2016 19:38, Dmitry Ivanov wrote: Hi, Artur I've made an attempt to fix some of the issues you've listed, although there

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Abhijit Menon-Sen
At 2016-03-21 13:04:33 +0300, a.korot...@postgrespro.ru wrote: > > I'm not sure why we want to make new dependency type by ALTER FUNCTION > command, not ALTER EXTENSION? It's a matter of semantics. It means something very different than what an 'e' dependency means. The extension doesn't own the f

Re: [HACKERS] improving GROUP BY estimation

2016-03-21 Thread Alexander Korotkov
Hi, Dean! On Fri, Mar 18, 2016 at 1:20 PM, Dean Rasheed wrote: > Probably a better URL to give is > http://www.adellera.it/investigations/distinct_balls/ which has a link > to the PDF version of the paper and also some supporting material. > > However, while that paper is in general very clear,

Re: [HACKERS] fd.c: flush data problems on osx

2016-03-21 Thread Stas Kelvich
> On 18 Mar 2016, at 14:45, Stas Kelvich wrote: >> >>> One possible solution for that is just fallback to pg_fdatasync in case >>> when offset = nbytes = 0. >> >> Hm, that's a bit heavyweight. I'd rather do an lseek(SEEK_END) to get >> the file size. Could you test that? >> > > It looks like

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-21 Thread Andres Freund
Hi, I've pushed the new API. We might want to use it in more places... On 2015-12-25 20:08:15 +0300, Васильев Дмитрий wrote: > I suddenly found commit ac1d794 gives up to 3 times performance degradation. > > I tried to run pgbench -s 1000 -j 48 -c 48 -S -M prepared on 70 CPU-core > machine: > co

Re: [HACKERS] fd.c: flush data problems on osx

2016-03-21 Thread Andres Freund
On 2016-03-21 14:46:09 +0300, Stas Kelvich wrote: > > > On 18 Mar 2016, at 14:45, Stas Kelvich wrote: > >> > >>> One possible solution for that is just fallback to pg_fdatasync in case > >>> when offset = nbytes = 0. > >> > >> Hm, that's a bit heavyweight. I'd rather do an lseek(SEEK_END) to g

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Alexander Korotkov
Hi! I see that patch changes existing regression tests in tsearch2.out. *** a/contrib/tsearch2/expected/tsearch2.out --- b/contrib/tsearch2/expected/tsearch2.out *** SELECT '(!1|2)&3'::tsquery; *** 278,292 (1 row) SELECT '1|(2|(4|(5|6)))'::tsquery; ! tsquery

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying change

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying change

Re: [HACKERS] fd.c: flush data problems on osx

2016-03-21 Thread Stas Kelvich
On 21 Mar 2016, at 14:53, Andres Freund wrote: > Hm. I think we should rather just skip calling pg_flush_data in the > directory case, that very likely isn't beneficial on any OS. Seems reasonable, changed. > I think we still need to fix the mmap() implementation to support the > offset = 0, nby

Re: [HACKERS] Relation extension scalability

2016-03-21 Thread Amit Kapila
On Fri, Mar 18, 2016 at 2:38 PM, Dilip Kumar wrote: > > > On Thu, Mar 17, 2016 at 1:31 PM, Petr Jelinek wrote: >> >> Great. >> >> Just small notational thing, maybe this would be simpler?: >> extraBlocks = Min(512, lockWaiters * 20); > > > Done, new patch attached. > Review comments: 1. /* + *

Re: [HACKERS] Parallel Aggregate

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 11:24 PM, Alvaro Herrera wrote: > David Rowley wrote: >> On 21 March 2016 at 15:48, Alvaro Herrera wrote: >> > David Rowley wrote: >> > >> >> I've rewritten the comment to become: >> >> >> >> /* >> >> * Providing that the estimated size of the hashtable does not exceed >>

Re: [HACKERS] latch usage and postmaster death

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 5:35 AM, Andres Freund wrote: > a significant number of WaitLatch's in the backend currently don't check > for postmaster death. That's imo wrong. E.g. SELECT pg_sleep(100); just > continues to run. > > I think we should change most sites to error out in that case. I wonde

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Konstantin Knizhnik
On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchrono

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-21 Thread Haribabu Kommi
On Mon, Mar 14, 2016 at 4:51 PM, Amit Kapila wrote: > On Fri, Mar 11, 2016 at 5:21 PM, Haribabu Kommi > wrote: >> >> On Fri, Mar 11, 2016 at 12:00 AM, Amit Kapila >> wrote: >> >> >> >> I am not able to find the reason for this error. This error is >> >> occurring >> >> only >> >> when the Postgr

Re: [HACKERS] flex: where's THIS been all this time?

2016-03-21 Thread Yury Zhuravlev
While I'm not quite sufficiently excited to run around and fix all our .l files like this today, I'm definitely planning to do it for psql's lexer, since I'm messing with that right now, and I don't much like Horiguchi-san's solution to the problem. +1. More less code for CMake. PS This hack gi

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alexander Korotkov
On Mon, Mar 21, 2016 at 2:19 PM, Abhijit Menon-Sen wrote: > At 2016-03-21 13:04:33 +0300, a.korot...@postgrespro.ru wrote: > > > > I'm not sure why we want to make new dependency type by ALTER FUNCTION > > command, not ALTER EXTENSION? > > It's a matter of semantics. It means something very diffe

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical

[HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Chapman Flack
On 03/21/2016 06:08 AM, Aleksander Alekseev wrote: > As you may see there are "holes" that were in fact not filled. Under > normal conditions they will be filled with data previously stored on > stack which could be anything including passwords and other private > data. Afterwards this structure i

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Andres Freund
On March 21, 2016 2:08:54 PM GMT+01:00, Petr Jelinek wrote: >On 21/03/16 13:44, Konstantin Knizhnik wrote: >> >> >> On 21.03.2016 15:10, Petr Jelinek wrote: >>> Hi, >>> >>> On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in imple

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 14:15, Andres Freund wrote: On March 21, 2016 2:08:54 PM GMT+01:00, Petr Jelinek wrote: On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mec

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Andres Freund
On 2016-03-21 14:18:27 +0100, Petr Jelinek wrote: > On 21/03/16 14:15, Andres Freund wrote: > >>Only when the origin is actually setup for the current session. You > >>need > >>to call the replorigin_advance yourself from your apply code. > > > >That's problematic from a durability POV. > > > > Hu

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 14:25, Andres Freund wrote: On 2016-03-21 14:18:27 +0100, Petr Jelinek wrote: On 21/03/16 14:15, Andres Freund wrote: Only when the origin is actually setup for the current session. You need to call the replorigin_advance yourself from your apply code. That's problematic from a du

Re: [HACKERS] Parallel Aggregate

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 7:30 PM, David Rowley wrote: > An updated patch is attached. This hopefully addresses your concerns > with the comment, and also the estimate_hashagg_tablesize() NULL > checking. I have committed this after changing some of the comments. There might still be bugs ... but

Re: [HACKERS] [GENERAL] OS X 10.11.3, psql, bus error 10, 9.5.1

2016-03-21 Thread Tom Lane
Greg Stark writes: > On 12 Mar 2016 10:58 pm, "Tom Lane" wrote: >> I shall get rid of the const-ness, as well as the lame casting away >> of it, and I think I will also go make buildfarm member longfin use >> "-fno-common". It is truly sad that we apparently have no test >> machine that enforces

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Abhijit Menon-Sen
At 2016-03-21 12:04:40 +0530, a...@2ndquadrant.com wrote: > > I'll write up a patch for this. Thanks for the suggestions. Here's a patch to implement ALTER FUNCTION x DEPENDS ON EXTENSION y. The changes to functioncmds.c:AlterFunction were less intrusive than I had originally feared. -- Abhijit

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-03-21 Thread Robert Haas
On Sat, Mar 19, 2016 at 8:30 AM, Michael Paquier wrote: >> Doing that with the >> level of detail and care that it seems to me to require seems like an >> almost-impossible task. Most of the major features I've committed >> this CommitFest are patches where I've personally done multiple rounds >>

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-21 Thread Petr Jelinek
Hi, thanks for review. On 17/03/16 13:36, Tomas Vondra wrote: Hi, a few comments about the last version of the patch: 1) LogicalDecodeMessageCB Do we actually need the 'transactional' parameter here? I mean, having the 'txn' should be enough, as transactional = (txt != NULL) Agreed

Re: [HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Aleksander Alekseev
> Well, the documentation already says to avoid it: > > http://www.postgresql.org/docs/current/static/xfunc-c.html > >Another important point is to avoid leaving any uninitialized >bits within data type values; for example, take care to zero out >any alignment padding bytes that might

Re: [HACKERS] Postgres_fdw join pushdown - getting server crash in left outer join of three table

2016-03-21 Thread Ashutosh Bapat
Thanks Michael for looking into this. > In get_useful_ecs_for_relation, it seems to me that this assertion > should be removed and replaces by an actual check because even if > right_ec and left_ec are initialized, we cannot be sure that ec_relids > contains the relations specified: > /*

Re: [HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Chapman Flack
On 03/21/2016 10:21 AM, Aleksander Alekseev wrote: > Well in this case here is a patch that fixes "use of uninitialized > value" reports by MemorySanitizer I managed to catch so far. I'm new here so someone more experienced would have to weigh in, but I would wonder a couple of things: a. whethe

Re: [HACKERS] [COMMITTERS] pgsql: Support parallel aggregation.

2016-03-21 Thread David Fetter
On Mon, Mar 21, 2016 at 01:33:28PM +, Robert Haas wrote: > Support parallel aggregation. ...and there was much rejoicing! Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember

Re: [HACKERS] [COMMITTERS] pgsql: Support parallel aggregation.

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 10:35 AM, David Fetter wrote: > On Mon, Mar 21, 2016 at 01:33:28PM +, Robert Haas wrote: >> Support parallel aggregation. > > ...and there was much rejoicing! I know *I* am! -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] incorrect docs for pgbench / skipped transactions

2016-03-21 Thread Robert Haas
On Sat, Mar 19, 2016 at 3:28 PM, Fabien COELHO wrote: >>> Thanks for the pointer. However, I do not have "editor priviledge" on >>> this >>> wiki, maybe Tomas has? >> >> I gave you editor privs now, but since it's in 9.5 I guess it needs to >> be on the bug tracker (Except, of course, we don't hav

Re: [HACKERS] [COMMITTERS] pgsql: Support parallel aggregation.

2016-03-21 Thread Simon Riggs
On 21 March 2016 at 14:35, David Fetter wrote: > On Mon, Mar 21, 2016 at 01:33:28PM +, Robert Haas wrote: > > Support parallel aggregation. > > ...and there was much rejoicing! > +1 Well done all. -- Simon Riggshttp://www.2ndQuadrant.com/ Post

Re: [HACKERS] max_parallel_degree context level

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 3:01 AM, David Rowley wrote: > On 12 February 2016 at 04:55, Robert Haas wrote: >> On Thu, Feb 11, 2016 at 10:32 AM, Simon Riggs wrote: >>> Is it slower if you request N workers, yet only 1 is available? >> >> I sure hope so. There may be some cases where more workers ar

Re: [HACKERS] [COMMITTERS] pgsql: Support parallel aggregation.

2016-03-21 Thread Bert
#woopwoop! :-D great work, all! On Mon, Mar 21, 2016 at 3:43 PM, Simon Riggs wrote: > On 21 March 2016 at 14:35, David Fetter wrote: > >> On Mon, Mar 21, 2016 at 01:33:28PM +, Robert Haas wrote: >> > Support parallel aggregation. >> >> ...and there was much rejoicing! >> > > +1 > > Well don

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 9:31 AM, Michael Paquier wrote: > And the patch attached gives the following output: > With title: > =# \watch 1 > Watch every 1sSun Mar 20 22:28:38 2016 > popo > a > --- > 1 > (1 row) > > And without title: > Watch every 1sSun Mar 20 22:29:31 2016 > > a > --- >

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-21 Thread Craig Ringer
On 18 March 2016 at 20:36, Artur Zakirov wrote: > On 17.03.2016 15:42, Craig Ringer wrote: > >> >> >> Would you mind sharing the plugin here? I could add it to >> src/test/modules and add some t/ tests so it runs under the TAP test >> framework. >> >> >> -- >> Craig Ringer http://www.2ndQuadran

Re: [HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Aleksander Alekseev
> I'm new here so someone more experienced would have to weigh in, > but I would wonder a couple of things: > > a. whether a braced struct assignment is supported in every >C compiler that PostgreSQL still intends to support > > b. whether such a struct assignment is guaranteed to initialize

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Mon, Mar 21, 2016 at 8:03 AM, Robert Haas wrote: > On Sun, Mar 20, 2016 at 9:31 AM, Michael Paquier > wrote: > > And the patch attached gives the following output: > > With title: > > =# \watch 1 > > Watch every 1sSun Mar 20 22:28:38 2016 > > popo > > a > > --- > > 1 > > (1 row) > ​Thi

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 11:17 AM, David G. Johnston wrote: >> And does everybody agree that this is a desirable change? > > Adding the title is desirable. While I'm inclined to bike-shed this > anything that gets it in I can live with and so I'm content letting the > author/committer decide where

Re: [HACKERS] [patch] Proposal for \crosstabview in psql

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 5:27 PM, Pavel Stehule wrote: > From my perspective, it is ready for commiter. Daniel solved the most big > issues. OK, so that brings us back to: is there any committer who likes this enough to want to look at committing it? My view hasn't changed much since http://www.

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > + else if (strcmp(defel->defname, "extdepend") == 0) > + { > + if (*extdepend_item) > + goto duplicate_error; > + > + *extdepend_item = defel; > + } > else > return false; > I'm not sure I agr

Re: [HACKERS] [patch] Proposal for \crosstabview in psql

2016-03-21 Thread Alvaro Herrera
Robert Haas wrote: > On Sun, Mar 20, 2016 at 5:27 PM, Pavel Stehule > wrote: > > From my perspective, it is ready for commiter. Daniel solved the most big > > issues. > > OK, so that brings us back to: is there any committer who likes this > enough to want to look at committing it? My view hasn

[HACKERS] BRIN is missing in multicolumn indexes documentation

2016-03-21 Thread Petr Jediný
Hello, the http://www.postgresql.org/docs/9.5/static/indexes-multicolumn.html page doesn't mention BRIN support, but according to the http://www.postgresql.org/docs/9.5/static/sql-createindex.html it is supported in multicolumn setup. The attached patch (git diff against master branch) fixes the

Re: [HACKERS] Combining Aggregates

2016-03-21 Thread Robert Haas
On Sat, Mar 19, 2016 at 11:48 PM, David Rowley wrote: > 0002: Adds serial/de-serial function support to CREATE AGGREGATE, > contains minor fix-ups from last version. This looks pretty good, but don't build_aggregate_serialfn_expr and build_aggregate_deserialfn_expr compile down to identical machi

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2016-03-21 Thread Robert Haas
On Wed, Mar 2, 2016 at 12:01 AM, Pavel Stehule wrote: >> I see the pfree you added isn't allowed on a NULL pointer but as far >> as I see message is guaranteed not to be NULL as dgettext never >> returns NULL. >> >> I'll mark this Ready for Committer. > > Thank you very much This patch needs a co

Re: [HACKERS] Combining Aggregates

2016-03-21 Thread David Rowley
On 20 March 2016 at 16:48, David Rowley wrote: > I've attached another series of patches: > > 0001: This is the latest Parallel Aggregate Patch, not intended for > review here, but is required for the remaining patches. This patch has > changed quite a bit from the previous one that I posted here,

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-21 Thread Robert Haas
On Tue, Mar 1, 2016 at 12:38 AM, Michael Paquier wrote: > Thoughts? I have registered that in the CF app, and a patch is attached. It is very difficult to believe that this is a good idea: --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalrec

Re: [HACKERS] WIP: Covering + unique indexes.

2016-03-21 Thread Anastasia Lubennikova
19.03.2016 08:00, Peter Geoghegan: On Fri, Mar 18, 2016 at 5:15 AM, David Steele wrote: It looks like this patch should be marked "needs review" and I have done so. Uh, no it shouldn't. I've posted an extensive review on the original design thread. See CF entry: https://commitfest.postgresql.

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-21 Thread Teodor Sigaev
+ *implementation of quad-4d tree over boxes for SP-GiST. Isn't the whole thing actually 3D? No. The idea if this work is a representation of 2d box as 4d point. Quad means quadrant of 2d plane. Originally such kind of tree was developed for 2d point, and each node of tree splits plane on 4

Re: [HACKERS] Speedup twophase transactions

2016-03-21 Thread Jesper Pedersen
On 03/18/2016 12:50 PM, Stas Kelvich wrote: On 11 Mar 2016, at 19:41, Jesper Pedersen wrote: Thanks for review, Jesper. Some comments: * The patch needs a rebase against the latest TwoPhaseFileHeader change Done. * Rework the check.sh script into a TAP test case (src/test/recovery), as

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Tom Lane
Robert Haas writes: > Well, the title isn't normally centered, but yeah, that is odd. Yeah, > that is odd. Come to think of it, I think I might have expected the > title to appear *above* "Watch every %s", not below it. That might > decrease the oddness. AFAICS, it appears *beside* it with thi

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-21 Thread Petr Jelinek
Just noticed there is missing symlink in the pg_xlogdump. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services >From f47730e5e8ef5797c7595aafcbf8cff3b375d0ad Mon Sep 17 00:00:00 2001 From: Petr Jelinek Date: Wed, 24 Feb 2016 1

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Mon, Mar 21, 2016 at 10:14 AM, Tom Lane wrote: > Robert Haas writes: > > Well, the title isn't normally centered, but yeah, that is odd. Yeah, > > that is odd. Come to think of it, I think I might have expected the > > title to appear *above* "Watch every %s", not below it. That might > >

Re: [HACKERS] jsonb array-style subscription

2016-03-21 Thread David Steele
On 3/20/16 2:29 PM, Dmitry Dolgov wrote: > Do you have an updated patch ready? No, I'm afraid it will not be ready for Monday. I have marked this "returned with feedback". Please feel free to submit a reworked patch for 9.7! -- -David da...@pgmasters.net -- Sent via pgsql-hackers mailin

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Tom Lane
"David G. Johnston" writes: > I'd rather not omit sleep but removing "Watch every" is fine (preferred > actually), so: > Title Is Here Mon Mar 21 15:05:06 2016 (5s) Meh ... seems a bit awkward to me. Couldn't you include " (5s)" in the title, if you want that info? If it's variable, you cou

Re: [HACKERS] checkpointer continuous flushing

2016-03-21 Thread Tomas Vondra
Hi, I've repeated the tests, but this time logged details for 5% of the transaction (instead of aggregating the data for each second). I've also made the tests shorter - just 12 hours instead of 24, to reduce the time needed to complete the benchmark. Overall, this means ~300M transactions i

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > I'd rather not omit sleep but removing "Watch every" is fine (preferred > > actually), so: > > Title Is Here Mon Mar 21 15:05:06 2016 (5s) > > Meh ... seems a bit awkward to me. Couldn't you include " (5s)" in the

Re: [HACKERS] Parallel Aggregate

2016-03-21 Thread David Rowley
On 22 March 2016 at 02:35, Robert Haas wrote: > I have committed this after changing some of the comments. > > There might still be bugs ... but I don't see them. And the speedups > look very impressive. > > Really nice work, David. Thanks for that, and thank you for taking the time to carefully

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 2:09 PM, David G. Johnston wrote: > On Monday, March 21, 2016, Tom Lane wrote: >> "David G. Johnston" writes: >> > I'd rather not omit sleep but removing "Watch every" is fine (preferred >> > actually), so: >> > Title Is Here Mon Mar 21 15:05:06 2016 (5s) >> >> Meh ..

Re: [HACKERS] incorrect docs for pgbench / skipped transactions

2016-03-21 Thread Fabien COELHO
Ok, I added a reference to the commitfest entry from this wiki page, and a note about partial 9.5 backporting. Please split the patch into one part for backporting and one part for master-only and post both patches, clearly indicating which is which. Attached are the full patch for head and

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-21 Thread Thomas Munro
On Mon, Mar 21, 2016 at 6:09 PM, Andres Freund wrote: > On 2016-03-21 11:52:43 +1300, Thomas Munro wrote: >> * I would be interested in writing a kqueue implementation of this for >> *BSD (and MacOSX?) at some point if someone doesn't beat me to it. > > I hoped that somebody would do that - that'd

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Robert Haas wrote: > On Mon, Mar 21, 2016 at 2:09 PM, David G. Johnston > > wrote: > > On Monday, March 21, 2016, Tom Lane > > wrote: > >> "David G. Johnston" > writes: > >> > I'd rather not omit sleep but removing "Watch every" is fine > (preferred > >> > actually), so

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Alvaro Herrera
David G. Johnston wrote: > Tom doesn't care enough to veto and you don't really care... > > I'll admit it's awkward because it's abbreviated but if someone enters > \watch 5 and then sees (5s) in the title I think they can put two and two > together. > > If the watched query takes a long to run,

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-21 Thread Tom Lane
Robert Haas writes: > On Sun, Mar 20, 2016 at 1:07 PM, Tom Lane wrote: >> This solves the problem of allowing SQL commands in scripts to span >> lines, ... > Excellent. >> but it doesn't do anything about backslash commands, which was >> the original point according to the thread title ;-). >

Re: [HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Tom Lane
Chapman Flack writes: > On 03/21/2016 10:21 AM, Aleksander Alekseev wrote: >> Well in this case here is a patch that fixes "use of uninitialized >> value" reports by MemorySanitizer I managed to catch so far. > I'm new here so someone more experienced would have to weigh in, > but I would wonder

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Tom Lane
"David G. Johnston" writes: > I'll admit it's awkward because it's abbreviated but if someone enters > \watch 5 and then sees (5s) in the title I think they can put two and two > together. Where I find this to be awkward is that the format is randomly different between the user-title and no-user-

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Tom Lane
Alvaro Herrera writes: > (I'll also use this opportunity to complain again about not being able > to use floating point sleep time.) That's not unreasonable either, though it seems like material for a separate patch. regards, tom lane -- Sent via pgsql-hackers mailing

Re: [HACKERS] snapshot too old, configured by time

2016-03-21 Thread Thom Brown
On 17 March 2016 at 21:15, Kevin Grittner wrote: > New patch just to merge in recent commits -- it was starting to > show some bit-rot. Tests folded in with main patch. In session 1, I've run: # begin transaction isolation level repeatable read ; BEGIN *# declare stuff scroll cursor for select

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > I'll admit it's awkward because it's abbreviated but if someone enters > > \watch 5 and then sees (5s) in the title I think they can put two and two > > together. > > Where I find this to be awkward is that the format

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 3:01 PM, Tom Lane wrote: >> Wait, was it really? I'd been thinking it was mostly to continue >> queries, not metacommands, but maybe I missed the boat. > > Nah, you're right, it was about continuing queries. Still, we've had > complaints about the other thing too, and I t

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-21 Thread Kevin Grittner
On Mon, Mar 21, 2016 at 11:57 AM, Teodor Sigaev wrote: >> I couldn't get the term 4D point. Maybe it means that we are >> using box datatype as the prefix, but we are not treating them >> as boxes. > > exactly, we treat boxes as 4-dimentional points. I'm not entirely sure I understand the termi

Re: [HACKERS] Choosing parallel_degree

2016-03-21 Thread Julien Rouhaud
On 21/03/2016 05:18, James Sewell wrote: > OK cool, thanks. > > Can we remove the minimum size limit when the per table degree setting > is applied? > > This would help for tables with 2 - 1000 pages combined with a high CPU > cost aggregate. > Attached v4 implements that. It also makes sure t

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-21 Thread Tom Lane
Robert Haas writes: > On Mon, Mar 21, 2016 at 3:01 PM, Tom Lane wrote: >> Um, why exactly? That psql behavior is of really ancient standing, and >> we have not had complaints about it. > I think that's mostly because the psql metacommands are ridiculously > impoverished. I'm guessing that pgbe

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 7:19 AM, Abhijit Menon-Sen wrote: > At 2016-03-21 13:04:33 +0300, a.korot...@postgrespro.ru wrote: >> >> I'm not sure why we want to make new dependency type by ALTER FUNCTION >> command, not ALTER EXTENSION? > > It's a matter of semantics. It means something very different

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 3:42 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Mar 21, 2016 at 3:01 PM, Tom Lane wrote: >>> Um, why exactly? That psql behavior is of really ancient standing, and >>> we have not had complaints about it. > >> I think that's mostly because the psql metacommands

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-21 Thread Tom Lane
Robert Haas writes: > Mmph. I just don't see any benefit in being able to start a command > in the middle of a line. I agree that there's no functional benefit; it's a matter of consistency. In particular, psql has always allowed you to write multiple SQL commands per line: SELECT 2+2; SELE

Re: [HACKERS] Declarative partitioning

2016-03-21 Thread Robert Haas
On Wed, Mar 16, 2016 at 10:49 AM, Alexander Korotkov wrote: >> > I'd like to validate that this development plan doesn't overlaps with >> > your >> > plans. If out plans are not overlapping then let's accept this plan of >> > work >> > for 9.7. >> >> It looks OK to me. Thanks for sharing it. > >

Re: [HACKERS] Declarative partitioning

2016-03-21 Thread Simon Riggs
On 21 March 2016 at 19:55, Robert Haas wrote: > On Wed, Mar 16, 2016 at 10:49 AM, Alexander Korotkov > wrote: > >> > I'd like to validate that this development plan doesn't overlaps with > >> > your > >> > plans. If out plans are not overlapping then let's accept this plan > of > >> > work > >>

Re: [HACKERS] snapshot too old, configured by time

2016-03-21 Thread Kevin Grittner
Thanks to all for the feedback; I will try to respond later this week. First I'm trying to get my reviews for other patches posted. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

[HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Merlin Moncure
Patch is trivial (see below), discussion is not :-). I see no useful reason to require INTO when returning data with SELECT. However, requiring queries to indicate not needing data via PERFORM causes some annoyances: *) converting routines back and forth between pl/pgsql and pl/sql requires need

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Pavel Stehule
Hi 2016-03-21 21:24 GMT+01:00 Merlin Moncure : > Patch is trivial (see below), discussion is not :-). > > I see no useful reason to require INTO when returning data with > SELECT. However, requiring queries to indicate not needing data via > PERFORM causes some annoyances: > > *) converting rout

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-21 Thread Tom Lane
So I looked into this, and found that persuading psql to let backslash commands cross line boundaries is a much bigger deal than just fixing the lexer. The problem is that MainLoop would need to grow an understanding of having received only a partial backslash command and needing to go back to rea

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Tom Lane
"David G. Johnston" writes: > On Monday, March 21, 2016, Tom Lane wrote: >> What about just discarding the old format entirely, and printing one of >> these two things: >> >> Timestamp (every Ns) >> >> User Given Title Timestamp (every Ns) > This works for me. If I don't hear objections PDQ,

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Alvaro Herrera
Tom Lane wrote: > "David G. Johnston" writes: > > On Monday, March 21, 2016, Tom Lane wrote: > >> What about just discarding the old format entirely, and printing one of > >> these two things: > >> > >> Timestamp (every Ns) > >> > >> User Given Title Timestamp (every Ns) > > > This works for

  1   2   >