Re: [HACKERS] Sequence Access Method WIP

2016-01-18 Thread Craig Ringer
Needs rework after the commit of https://commitfest.postgresql.org/8/336/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-01-18 Thread Amit Kapila
On Mon, Jan 18, 2016 at 10:54 AM, Michael Paquier wrote: > > On Sun, Jan 17, 2016 at 1:37 PM, Amit Kapila wrote: > > On Sat, Jan 16, 2016 at 6:37 PM, Michael Paquier < michael.paqu...@gmail.com> > > wrote: > >> > >> > >> > > > > So here if I

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-01-18 Thread Andres Freund
On 2015-12-21 16:26:25 +0900, Michael Paquier wrote: > On Sun, Dec 20, 2015 at 10:14 PM, Michael Paquier > wrote: > > Speaking of which, this patch was registered in this CF, I am moving > > it to the next as a bug fix. > > I found a stupid bug in my previous patch:

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Haribabu Kommi
On Mon, Jan 18, 2016 at 10:32 PM, David Rowley wrote: > On 18 January 2016 at 16:44, Robert Haas wrote: >> >> On Sun, Jan 17, 2016 at 9:26 PM, David Rowley >> wrote: >> > hmm, so wouldn't that mean that the

[HACKERS] Expanded Objects and Order By

2016-01-18 Thread Paul Ramsey
I'm starting to think this might not actually be my mistake, but be a very narrow issue w/ the expanded object code. So, I've added support for converting postgis in-memory objects into expanded outputs, and have overwritten the usual lwgeom_to_gserialized() function with one that creates an

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

2016-01-18 Thread Craig Ringer
On 15 January 2016 at 14:26, Abhijit Menon-Sen wrote: > * «DROP EXTENSION ext» won't work without adding CASCADE, which is an > (admittedly relatively minor) inconvenience to users. > > * More importantly, pg_dump will dump all those trigger definitions, > which is

Re: [HACKERS] extend pgbench expressions with functions

2016-01-18 Thread Fabien COELHO
The basic operator functions also do not check for integer overflows. This is a feature. I think that they should not check for overflow, as in C, this is just int64_t arithmetic "as is". (int64_t is not an available type on Windows btw.) Possibly. I really meant "64 bits signed

Re: [HACKERS] Do we need SQL-level access to amoptions functions?

2016-01-18 Thread Craig Ringer
On 18 January 2016 at 04:13, Tom Lane wrote: > > Does anyone know of client code that's actually doing this? > > site:github.com "ginoptions" -"pg_am.h" -"ginutil.c" -png -typedefs -vim and the same for "btreeoptions" looks promising. Nothing seems to spring out on

Re: [HACKERS] Sequence Access Method WIP

2016-01-18 Thread Craig Ringer
On 1 January 2016 at 07:51, Petr Jelinek wrote: > > Other than that, this is based on the new am api by Alexander Korotkov > [1]. It extends it by adding another column called amkind to the pg_am > which can have either value "i" for index or "S" for sequence (same as >

Re: [HACKERS] Optimizer questions

2016-01-18 Thread Gilles Darold
Le 18/01/2016 03:47, Bruce Momjian a écrit : > On Tue, Jan 5, 2016 at 05:55:28PM +0300, konstantin knizhnik wrote: >> Hi hackers, >> >> I want to ask two questions about PostgreSQL optimizer. >> I have the following query: >> >> SELECT o.id as id,s.id as sid,o.owner,o.creator,o.parent_id >> as

Re: [HACKERS] postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

2016-01-18 Thread Ashutosh Bapat
Hi All, PFA patches for postgres_fdw join pushdown, taken care of all TODOs in my last mail. Here is the list of things that have been improved/added new as compared to Hanada-san's previous patch at [1]. 1. Condition handling for join Patch in [1] allowed a foreign join to be pushed down if

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Andres Freund
On 2016-01-18 10:18:34 +0900, Michael Paquier wrote: > We are trying to hide away from non-superusers WAL-related information > in system views and system function, that's my point to do the same > here. We are? pg_current_xlog_insert_location(), pg_current_xlog_location(),

Re: [HACKERS] Death by regexp_replace

2016-01-18 Thread Benedikt Grundmann
thanks On Fri, Jan 15, 2016 at 7:22 PM, Devrim Gündüz wrote: > Hi, > > That is the version of *repo* RPM, not PostgreSQL itself.Once you install > it, you can grab the latest version with > > yum install postgresql92-server > > Regards, Devrim > > On January 15, 2016 7:48:53

Re: [HACKERS] extend pgbench expressions with functions

2016-01-18 Thread Fabien COELHO
OK, so I had an extra look at this patch and I am marking it as ready for committer. Ok. - INT64_MIN / -1 throws a core dump, and errors on HEAD. I think this should be fixed, Fabien does not. Yep. Another point about this one is that it is not related to this patch about functions. --

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-01-18 Thread Shulgin, Oleksandr
On Wed, Dec 2, 2015 at 10:20 AM, Shulgin, Oleksandr < oleksandr.shul...@zalando.de> wrote: > On Tue, Dec 1, 2015 at 7:00 PM, Tom Lane wrote: > >> "Shulgin, Oleksandr" writes: >> > This post summarizes a few weeks of research of ANALYZE

Re: [HACKERS] 2016-01 Commitfest

2016-01-18 Thread Alvaro Herrera
Two weeks into the commitfest, things have moved a bit: Needs review: 53. Waiting on Author: 20. Ready for Committer: 10. Committed: 16. Total: 99. https://commitfest.postgresql.org/8/ We have two committed patches since last report -- not a lot for a whole week. We've managed

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 11:09 AM, Alvaro Herrera wrote: > Amit Kapila wrote: > >> The reason for not updating the patch related to this thread is that it is >> dependent on the work for refactoring the tranches for LWLocks [1] >> which is now coming towards an end, so I

Re: [HACKERS] 2016-01 Commitfest

2016-01-18 Thread Atri Sharma
On Mon, Jan 18, 2016 at 11:05 PM, Alvaro Herrera wrote: > Two weeks into the commitfest, things have moved a bit: > > Needs review: 53. > Waiting on Author: 20. > Ready for Committer: 10. > Committed: 16. > Total: 99.

Re: [HACKERS] Removing service-related code in pg_ctl for Cygwin

2016-01-18 Thread Alvaro Herrera
Andrew Dunstan wrote: > I think we can be a bit more adventurous and remove all the Cygwin-specific > code. See attached patch, which builds fine on buildfarm cockatiel. Hopefully you also tested that it builds under MSVC :-) -- Álvaro Herrerahttp://www.2ndQuadrant.com/

Re: [HACKERS] proposal: add 'waiting for replication' to pg_stat_activity.state

2016-01-18 Thread Alvaro Herrera
Andres Freund wrote: > On December 4, 2015 9:48:55 AM GMT+01:00, Craig Ringer > wrote: > >On 3 December 2015 at 22:58, Amit Kapila > >wrote: > > > >> On Thu, Dec 3, 2015 at 9:02 AM, Craig Ringer > >> wrote: > >

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Tom Lane
Robert Haas writes: > Yeah. The API contract for an expanded object took me quite a while > to puzzle out, but it seems to be this: if somebody hands you an R/W > pointer to an expanded object, you're entitled to assume that you can > "take over" that object and mutate it

Re: [HACKERS] Trivial fixes for some IDENTIFICATION comment lines

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 12:01 PM, Tom Lane wrote: > Andres Freund writes: >> On 2016-01-18 12:52:06 +0100, Shulgin, Oleksandr wrote: >>> I've noticed that in src/backend/replication/logical/reorderbuffer.c, the >>> IDENTIFICATION comment line is incorrect:

Re: [HACKERS] Removing service-related code in pg_ctl for Cygwin

2016-01-18 Thread Andrew Dunstan
On 01/14/2016 12:38 AM, Michael Paquier wrote: Hi all, Beginning a new thread seems more adapted regarding $subject but that's mentioned here as well: http://www.postgresql.org/message-id/CAB7nPqQXghm_SdB5iniupz1atzMxk=95gv9a8ocdo83sxcn...@mail.gmail.com It happens based on some

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 12:09 PM, Tom Lane wrote: > Robert Haas writes: >> Yeah. The API contract for an expanded object took me quite a while >> to puzzle out, but it seems to be this: if somebody hands you an R/W >> pointer to an expanded object,

Re: [HACKERS] Expanded Objects and Order By

2016-01-18 Thread Paul Ramsey
I have a size/flatten callback setup (and they are very careful not to write outside their boundaries), so that’s all OK. Since you’re not seeing anything “aha” in the error pattern, I’ll go back to the mats on memory… is there a good page on valgriding postgresql? I thought the memory manager

Re: [HACKERS] Making plpython 2 and 3 coexist a bit better

2016-01-18 Thread Bruce Momjian
On Mon, Jan 11, 2016 at 10:44:42AM -0500, Tom Lane wrote: > Commit 803716013dc1350f installed a safeguard against loading plpython2 > and plpython3 at the same time, stating > > + It is not allowed to use PL/Python based on Python 2 and PL/Python > + based on Python 3 in the same session,

Re: [HACKERS] [Proposal] Table partition + join pushdown

2016-01-18 Thread Robert Haas
On Tue, Dec 22, 2015 at 8:36 AM, Michael Paquier wrote: > On Fri, Nov 20, 2015 at 9:05 PM, Taiki Kondo wrote: >> I created v3 patch for this feature, and v1 patch for regression tests. >> Please find attached. >> >> [blah review and replies] >>

Re: [HACKERS] Additional role attributes && superuser review

2016-01-18 Thread Robert Haas
On Sun, Jan 17, 2016 at 6:58 PM, Stephen Frost wrote: > I'm not against that idea, though I continue to feel that there are > common sets of privileges which backup tools could leverage. > > The other issue that I'm running into, again, while considering how to > move back to

Re: [HACKERS] Making plpython 2 and 3 coexist a bit better

2016-01-18 Thread Tom Lane
Bruce Momjian writes: > On Mon, Jan 11, 2016 at 10:44:42AM -0500, Tom Lane wrote: >> But it gets worse: a report today in pgsql-general points out that >> even if you have the two languages in use *in different databases*, >> pg_upgrade will fail, because pg_upgrade rather

Re: [HACKERS] Expanded Objects and Order By

2016-01-18 Thread Tom Lane
Paul Ramsey writes: > Since you’re not seeing anything “aha” in the error pattern, I’ll go > back to the mats on memory… is there a good page on valgriding postgresql? https://wiki.postgresql.org/wiki/Valgrind > I thought the memory manager papered over

Re: [HACKERS] Truncating/vacuuming relations on full tablespaces

2016-01-18 Thread Robert Haas
On Fri, Jan 15, 2016 at 2:16 PM, Tom Lane wrote: > Robert Haas writes: >> Now, I do think it's a somewhat fair complaint that if you have a >> tablespace which is totally, 100% full, recovery is difficult. You >> can probably DROP the table, but

Re: [HACKERS] [PATCH] Improve spinlock inline assembly for x86.

2016-01-18 Thread Robert Haas
On Sun, Jan 17, 2016 at 6:38 AM, Andreas Seltenreich wrote: > I'm currently experimenting with just-in-time compilation using libfirm. > While discussing issues with its developers, it was pointed out to me > that our spinlock inline assembly is less than optimal. Attached is

Re: [HACKERS] Proposal: speeding up GIN build with parallel workers

2016-01-18 Thread Robert Haas
On Fri, Jan 15, 2016 at 5:38 PM, Constantin S. Pan wrote: > In current state the implementation is just a proof of concept > and it has all the configuration hardcoded, but it already works as is, > though it does not speed up the build process more than 4 times on my >

Re: [HACKERS] Cannot find a working 64-bit integer type

2016-01-18 Thread Robert Haas
On Sun, Jan 17, 2016 at 5:45 PM, Igal @ Lucee.org wrote: > UPDATE: when I ran: configure --without-zlib --enable-debug > CFLAGS="-Wno-cpp" > > I did not get an error from configure (though I get an error from "make" but > that's another issue) > > I'm not sure what I'm "losing" by

Re: [HACKERS] Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102

2016-01-18 Thread Bruce Momjian
On Wed, Jan 13, 2016 at 10:47:18AM -0500, Tom Lane wrote: > Vladimir Sitnikov writes: > > Note: I state that mixing "kinds" of bind values is a bad application > > design anyway. In other words, application developer should understand > > if a query is DWH-like

Re: [HACKERS] Trivial fixes for some IDENTIFICATION comment lines

2016-01-18 Thread Andres Freund
On 2016-01-18 12:52:06 +0100, Shulgin, Oleksandr wrote: > I've noticed that in src/backend/replication/logical/reorderbuffer.c, the > IDENTIFICATION comment line is incorrect: > > * IDENTIFICATION > - * src/backend/catalog/dropcmds.c > - * src/backend/replication/logicalfuncs.c > - *

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread David Rowley
On 18 January 2016 at 16:44, Robert Haas wrote: > On Sun, Jan 17, 2016 at 9:26 PM, David Rowley > wrote: > > hmm, so wouldn't that mean that the transition function would need to > (for > > each input tuple): > > > > 1. Parse that StringInfo

[HACKERS] Trivial fixes for some IDENTIFICATION comment lines

2016-01-18 Thread Shulgin, Oleksandr
Hello, I've noticed that in src/backend/replication/logical/reorderbuffer.c, the IDENTIFICATION comment line is incorrect: * IDENTIFICATION * src/backend/replication/reorderbuffer.c By using a simple find+grep command I can see this is also the case for the following files: $ find src -name

[HACKERS] jsonb array-style subscription

2016-01-18 Thread Dmitry Dolgov
Hi, Here is a reworked version of patch for jsonb subscription. There weren't many changes in functionality: =# create TEMP TABLE test_jsonb_subscript ( id int, test_json jsonb ); =# insert into test_jsonb_subscript values (1, '{}'), (2, '{}'); =# update test_jsonb_subscript set

Re: [HACKERS] postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

2016-01-18 Thread Thom Brown
On 18 January 2016 at 10:46, Ashutosh Bapat wrote: > Hi All, > PFA patches for postgres_fdw join pushdown, taken care of all TODOs in my > last mail. > > Here is the list of things that have been improved/added new as compared to > Hanada-san's previous patch at

Re: [HACKERS] [PATCH] better systemd integration

2016-01-18 Thread Alvaro Herrera
Peter Eisentraut wrote: > I have written a couple of patches to improve the integration of the > postgres daemon with systemd. Great. Is anything happening with these patches, or? They've been inactive for quite a while now. -- Álvaro Herrerahttp://www.2ndQuadrant.com/

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 6:32 AM, David Rowley wrote: >> In my tests, this seems to be slightly slower than what we're doing >> today; worst of all, it adds a handful of cycles to >> advance_transition_function() even when the aggregate is not an >> expanded object

Re: [HACKERS] Refactoring speculative insertion with unique indexes a little

2016-01-18 Thread Alvaro Herrera
Peter Geoghegan wrote: > On Fri, Dec 18, 2015 at 12:55 PM, Robert Haas wrote: > > I only see one patch version on the thread. > > I'm not going to post a revision until I thrash out the tiny issues > with Heikki. He kind of trailed off. So maybe that kills it >

Re: [HACKERS] Expanded Objects and Order By

2016-01-18 Thread Tom Lane
Paul Ramsey writes: > So, I've added support for converting postgis in-memory objects into > expanded outputs, and have overwritten the usual > lwgeom_to_gserialized() function with one that creates an expanded > object. I haven't done anything to actually handle

Re: [HACKERS] checkpointer continuous flushing

2016-01-18 Thread Andres Freund
On 2016-01-16 10:01:25 +0100, Fabien COELHO wrote: > > Hello Andres, > > >I measured it in a different number of cases, both on SSDs and spinning > >rust. I just reproduced it with: > > > >postgres-ckpt14 \ > > -D /srv/temp/pgdev-dev-800/ \ > > -c maintenance_work_mem=2GB \ > >

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-01-18 Thread Thom Brown
On 3 January 2016 at 13:26, Masahiko Sawada wrote: > On Fri, Dec 25, 2015 at 7:21 AM, Thomas Munro > wrote: >> On Fri, Dec 25, 2015 at 8:50 AM, Masahiko Sawada >> wrote: >>> On Wed, Dec 23, 2015 at 8:45 AM, Thomas

Re: [HACKERS] Trivial fixes for some IDENTIFICATION comment lines

2016-01-18 Thread Tom Lane
Andres Freund writes: > On 2016-01-18 12:52:06 +0100, Shulgin, Oleksandr wrote: >> I've noticed that in src/backend/replication/logical/reorderbuffer.c, the >> IDENTIFICATION comment line is incorrect: >> >> * IDENTIFICATION >> - *src/backend/catalog/dropcmds.c >> - *

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-01-18 Thread Alvaro Herrera
Amit Kapila wrote: > The reason for not updating the patch related to this thread is that it is > dependent on the work for refactoring the tranches for LWLocks [1] > which is now coming towards an end, so I think it is quite reasonable > that the patch can be updated for this work during commit

Re: [HACKERS] statistics for array types

2016-01-18 Thread Alvaro Herrera
Alexander Korotkov wrote: > The patch implementing my idea above is attached. What's the status here? Jeff, did you have a look at Alexander's version of your patch? Tomas, does this patch satisfy your concerns? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Pavel Stehule
> > > # explain analyze select a%100,length(string_agg(b,',')) from ab > group > > by 1; > > QUERY PLAN > > > --- > >

Re: [HACKERS] Optimizer questions

2016-01-18 Thread Konstantin Knizhnik
I am sorry for badly formatted query - I just cut it from C++ client program. I have one more question to community regarding this patch. Proposed patch fix the problem particularly for SORT+LIMIT clauses. In this case evaluation of expressions which are not used in sort is alway waste of

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-01-18 Thread Masahiko Sawada
On Mon, Jan 18, 2016 at 1:20 PM, Michael Paquier wrote: > On Sun, Jan 17, 2016 at 11:09 PM, Masahiko Sawada > wrote: >> On Wed, Jan 13, 2016 at 1:54 AM, Alvaro Herrera wrote: >> * Confirm value of pg_stat_replication.sync_state (sync, async or

Re: [HACKERS] jsonb - jsonb operators

2016-01-18 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: >> if there's any future intention to add a delete operator that removes > element/pair matches? > I think the operator (jsonb - jsonb) is logical because we have a shallow > concatenation function (something like a "union" operation), but we have >

Re: [HACKERS] Cannot find a working 64-bit integer type

2016-01-18 Thread Tom Lane
Robert Haas writes: > The relevant portion of config.log seems to be this: > configure:13285: gcc -o conftest.exe -Wall -Wmissing-prototypes > -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels > -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing >

Re: [HACKERS] Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102

2016-01-18 Thread Tom Lane
Bruce Momjian writes: > I never understood why we don't just keep the selectivity estimates of > previous plans and just reuse the plan if the selectivity estimates are > similar. Isn't parameter selectivity the only thing that distinguishes > on plan with parameter from

Re: [HACKERS] jsonb - jsonb operators

2016-01-18 Thread Glyn Astill
On Mon, 18/1/16, Tom Lane wrote: Subject: Re: [HACKERS] jsonb - jsonb operators To: "Dmitry Dolgov" <9erthali...@gmail.com> Cc: "Glyn Astill" , "Merlin Moncure" ,

Re: [HACKERS] Cannot find a working 64-bit integer type

2016-01-18 Thread Igal @ Lucee.org
On 1/18/2016 11:09 AM, Tom Lane wrote: Robert Haas writes: The relevant portion of config.log seems to be this: I do not think configure pays attention to mere warnings for this type of test. The real problem here seems to be the "permission denied" errors, which to me

Re: [HACKERS] Truncating/vacuuming relations on full tablespaces

2016-01-18 Thread Tom Lane
Robert Haas writes: > On Fri, Jan 15, 2016 at 2:16 PM, Tom Lane wrote: >> Presumably the hope would be that VACUUM would truncate off some of the >> heap, else there's not much good that's going to happen. That leaves >> me wondering exactly what the

Re: [HACKERS] Cannot find a working 64-bit integer type

2016-01-18 Thread Igal @ Lucee.org
It looks like Tom is correct. I added the directory tree to an exclude list of Microsoft Security Essentials and ran `configure` without any flags and it completed successfully this time. Thank you both for your time and expertise, Igal On 1/18/2016 11:23 AM, Igal @ Lucee.org wrote: On

Re: [HACKERS] Refactoring speculative insertion with unique indexes a little

2016-01-18 Thread Peter Geoghegan
On Mon, Jan 18, 2016 at 8:36 AM, Alvaro Herrera wrote: > If you refuse to post an updated version of the patch until Heikki > weighs in some more, and given that Heikki has (for the purposes of this > patch) completely vanished, I think we should mark this rejected. I

Re: [HACKERS] Refactoring speculative insertion with unique indexes a little

2016-01-18 Thread Alvaro Herrera
Peter Geoghegan wrote: > On Mon, Jan 18, 2016 at 8:36 AM, Alvaro Herrera > wrote: > > If you refuse to post an updated version of the patch until Heikki > > weighs in some more, and given that Heikki has (for the purposes of this > > patch) completely vanished, I think

Re: [HACKERS] custom function for converting human readable sizes to bytes

2016-01-18 Thread Vitaly Burovoy
On 1/4/16, Robert Haas wrote: > On Mon, Jan 4, 2016 at 10:17 AM, Pavel Stehule > wrote: >> [ new patch ] > > + case '-': > + ereport(ERROR, > + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > +

Re: [HACKERS] COPY (... tab completion

2016-01-18 Thread Andreas Karlsson
On 01/11/2016 02:01 AM, Peter Eisentraut wrote: I think this would be a useful addition. A couple of problems: Thanks for the review. A new version is attached. This change in the comment doesn't make sense to me and doesn't seem to match the code: - /* If we have COPY [BINARY] ,

Re: [HACKERS] Making plpython 2 and 3 coexist a bit better

2016-01-18 Thread Bruce Momjian
On Mon, Jan 18, 2016 at 01:10:05PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Mon, Jan 11, 2016 at 10:44:42AM -0500, Tom Lane wrote: > >> But it gets worse: a report today in pgsql-general points out that > >> even if you have the two languages in use *in different

Re: [HACKERS] Interesting read on SCM upending software and hardware architecture

2016-01-18 Thread Jim Nasby
On 1/18/16 2:47 PM, Peter Geoghegan wrote: On Mon, Jan 18, 2016 at 12:31 PM, Robert Haas wrote: People keep predicting the death of spinning media, but I think it's not happening to anywhere near as fast as that people think. Yes, I'm writing this on a laptop with an

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Joe Conway
On 01/18/2016 04:16 PM, Joe Conway wrote: > Please see the attached. Duplication removed. Actually please see this version instead. Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development diff --git

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 6:55 AM, Robert Haas wrote: > On Mon, Jan 18, 2016 at 4:43 AM, Andres Freund wrote: >> On 2016-01-18 10:18:34 +0900, Michael Paquier wrote: >>> We are trying to hide away from non-superusers WAL-related information >>> in system

Re: [HACKERS] COPY (... tab completion

2016-01-18 Thread Andreas Karlsson
On 01/19/2016 01:57 AM, Andreas Karlsson wrote: Thanks for the review. A new version is attached. Whops, attached the wrong file. Andreas diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index ad8a580..bc80ed0 100644 --- a/src/bin/psql/tab-complete.c +++

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-18 Thread Andreas Karlsson
On 01/11/2016 02:39 AM, Peter Eisentraut wrote: The second part is not necessary, because there is already code that completes FDW names after "FOREIGN DATA WRAPPER". So this already works. Good spot, thanks. I have no idea why I did not think it worked. Maybe it just did not work in 9.2 and

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Joe Conway
On 01/17/2016 02:29 PM, Joe Conway wrote: >> Documentation would be good to have. > > I'm definitely happy to write the docs, but earlier it was not clear > that there was enough support for this patch at all, and I don't want to > waste cycles writing docs for a feature that ultimately does not

Re: [HACKERS] source files without copyright notices

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 5:55 AM, Joe Conway wrote: > I never noticed before, but today I came across a header file without > any copyright notice at all. Turns out there are quite a few: > > grep -riL Copyright src/* --include=*.c --include=*.h > > Shouldn't at least some of

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Bruce Momjian
fOn Mon, Jan 18, 2016 at 01:54:02PM -0800, Joe Conway wrote: > On 01/18/2016 01:47 PM, Bruce Momjian wrote: > > On Sun, Jan 17, 2016 at 02:24:46PM -0800, Joe Conway wrote: > >> On 01/16/2016 06:02 AM, Michael Paquier wrote: > >>> On Wed, Dec 30, 2015 at 9:08 AM, Joe Conway

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-01-18 Thread Amit Kapila
On Mon, Jan 18, 2016 at 11:06 PM, Robert Haas wrote: > > On Mon, Jan 18, 2016 at 11:09 AM, Alvaro Herrera > wrote: > > Amit Kapila wrote: > > > >> The reason for not updating the patch related to this thread is that it is > >> dependent on the

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread David Rowley
On 19 January 2016 at 06:03, Pavel Stehule wrote: > > > > >> > # explain analyze select a%100,length(string_agg(b,',')) from ab >> group >> > by 1; >> > QUERY PLAN >> > >>

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 12:34 PM, Robert Haas wrote: > On Mon, Jan 18, 2016 at 12:09 PM, Tom Lane wrote: >> Robert Haas writes: >>> Yeah. The API contract for an expanded object took me quite a while >>> to puzzle out, but it

Re: [HACKERS] custom function for converting human readable sizes to bytes

2016-01-18 Thread Vitaly Burovoy
On 1/4/16, Pavel Stehule wrote: > 2016-01-04 18:13 GMT+01:00 Shulgin, Oleksandr : >> On Mon, Jan 4, 2016 at 6:03 PM, Pavel Stehule >> wrote: >> > 2016-01-04 17:48 GMT+01:00 Shulgin, Oleksandr >> >

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 1:49 PM, Michael Paquier wrote: > On Tue, Jan 19, 2016 at 11:08 AM, Joe Conway wrote: >> On 01/18/2016 04:16 PM, Joe Conway wrote: >>> Please see the attached. Duplication removed. >> >> Actually please see this version

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread David Rowley
On 19 January 2016 at 18:04, Tomas Vondra wrote: > Hi, > > On 01/19/2016 05:00 AM, David Rowley wrote: > >> On 19 January 2016 at 06:03, Pavel Stehule > > wrote: >> >> ... > >> >> It is strange, why

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Tomas Vondra
On 01/19/2016 05:14 AM, Robert Haas wrote: On Mon, Jan 18, 2016 at 12:34 PM, Robert Haas wrote: On Mon, Jan 18, 2016 at 12:09 PM, Tom Lane wrote: Robert Haas writes: Yeah. The API contract for an expanded object took me

[HACKERS] Advices on custom data type and extension development

2016-01-18 Thread Luciano Coutinho Barcellos
Dear friends, I'm planning to develop an extension, and I'm here for getting some help. But I would like to share the problem I intend to solve. Maybe my desired solution is not a good option. What I have: * a lot of data being generated every day, which are mainly queried

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Tom Lane
Robert Haas writes: > Here is a patch that helps a good deal. I changed things so that when > we create a context, we always allocate at least 1kB. That's going to kill performance in some other cases; subtransactions in particular rely on the subtransaction's

Re: [HACKERS] Re: [JDBC] 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102

2016-01-18 Thread Pavel Stehule
2016-01-18 23:50 GMT+01:00 Thomas Kellerer : > Robert Haas wrote: > > This isn't the first complaint about this mechanism that we've gotten, > > and it won't be the last. Way too many of our users are way more > > aware than they should be that the threshold here is five

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 11:08 AM, Joe Conway wrote: > On 01/18/2016 04:16 PM, Joe Conway wrote: >> Please see the attached. Duplication removed. > > Actually please see this version instead. Thanks for the new patch. + tuplestore_puttuple(tupstore, tuple); +

Re: [HACKERS] custom function for converting human readable sizes to bytes

2016-01-18 Thread Vitaly Burovoy
On 1/18/16, Vitaly Burovoy wrote: > <> > --- > + if (*strptr != '\0') > ... > + while (*strptr && !isspace(*strptr)) > Sometimes it explicitly compares to '\0', sometimes implicitly. > Common use is explicit comparison and it is preferred due to different

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Tomas Vondra
Hi, On 01/19/2016 05:00 AM, David Rowley wrote: On 19 January 2016 at 06:03, Pavel Stehule > wrote: ... It is strange, why hashaggregate is too slow? Good question. I looked at this and found my VM was swapping like crazy. Upon

Re: [HACKERS] Removing service-related code in pg_ctl for Cygwin

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 2:32 AM, Andrew Dunstan wrote: > > > On 01/14/2016 12:38 AM, Michael Paquier wrote: >> >> Hi all, >> >> Beginning a new thread seems more adapted regarding $subject but >> that's mentioned here as well: >> >>

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread Tomas Vondra
On 01/19/2016 06:04 AM, Tomas Vondra wrote: Hi, On 01/19/2016 05:00 AM, David Rowley wrote: Good question. I looked at this and found my VM was swapping like crazy. Upon investigation it appears that's because, since the patch creates a memory context per aggregated group, and in this case

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 1:40 AM, Masahiko Sawada wrote: > On Mon, Jan 18, 2016 at 1:20 PM, Michael Paquier > wrote: >> On Sun, Jan 17, 2016 at 11:09 PM, Masahiko Sawada >> wrote: >>> On Wed, Jan 13, 2016 at 1:54 AM,

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread David Rowley
On 19 January 2016 at 02:44, Haribabu Kommi wrote: > On Mon, Jan 18, 2016 at 10:32 PM, David Rowley > wrote: > > I just thought like direct mapping of the structure with text pointer. > something like > the below. > > result =

Re: [HACKERS] pgindent-polluted commits

2016-01-18 Thread Noah Misch
On Sat, Jan 16, 2016 at 09:57:45AM +, Simon Riggs wrote: > On 16 January 2016 at 02:10, Noah Misch wrote: > > On Wed, Jan 13, 2016 at 12:13:11PM -0500, Tom Lane wrote: > > > Basically this is trading off convenience of the committer (all of the > > > alternatives Noah

Re: [HACKERS] PATCH: postpone building buckets to the end of Hash (in HashJoin)

2016-01-18 Thread Tomas Vondra
Hi, On 12/17/2015 10:28 PM, Tomas Vondra wrote: Hi, On 12/17/2015 07:20 PM, Robert Haas wrote: ... If this doesn't regress performance in the case where the number of buckets is estimated accurately to begin with, then I think this is a great idea. Can you supply some performance tests

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-01-18 Thread Amit Kapila
On Mon, Jan 18, 2016 at 7:08 PM, Andres Freund wrote: > > On 2015-12-21 16:26:25 +0900, Michael Paquier wrote: > > On Sun, Dec 20, 2015 at 10:14 PM, Michael Paquier > > wrote: > > > Speaking of which, this patch was registered in this CF, I am

Re: [HACKERS] Combining Aggregates

2016-01-18 Thread David Rowley
On 19 January 2016 at 17:14, Robert Haas wrote: > On Mon, Jan 18, 2016 at 12:34 PM, Robert Haas > wrote: > > On Mon, Jan 18, 2016 at 12:09 PM, Tom Lane wrote: > >> Robert Haas writes: > >>> Yeah. The API

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-01-18 Thread Michael Paquier
On Wed, Dec 2, 2015 at 3:24 PM, Michael Paquier wrote: > On Wed, Dec 2, 2015 at 3:23 PM, Michael Paquier > wrote: >> On Wed, Dec 2, 2015 at 7:05 AM, Tomas Vondra >> wrote: >>> Attached is v2 of the patch, that

Re: Odd behavior in foreign table modification (Was: Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW)

2016-01-18 Thread Etsuro Fujita
On 2016/01/08 14:08, Etsuro Fujita wrote: On 2016/01/07 21:50, Etsuro Fujita wrote: On 2016/01/06 20:37, Thom Brown wrote: I've run into an issue: *# UPDATE master_customers SET id = 22 WHERE id = 16 RETURNING tableoid::regclass; ERROR: CONTEXT: Remote SQL command: UPDATE public.customers

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 1:28 PM, Amit Kapila wrote: > On Mon, Jan 18, 2016 at 7:08 PM, Andres Freund wrote: >> I find this patch rather unsatisfactory. Yes, it kinda solves the >> problem of archive timeout, but it leaves the bigger and longer

Re: [HACKERS] postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

2016-01-18 Thread Etsuro Fujita
On 2016/01/18 19:46, Ashutosh Bapat wrote: PFA patches for postgres_fdw join pushdown, taken care of all TODOs in my last mail. Here is the list of things that have been improved/added new as compared to Hanada-san's previous patch at [1]. Great! Thank you for working on that! I'll review

Re: [HACKERS] Minor code improvements to create_foreignscan_plan/ExecInitForeignScan

2016-01-18 Thread Etsuro Fujita
On 2016/01/15 19:00, Etsuro Fujita wrote: On 2016/01/12 18:00, Etsuro Fujita wrote: On 2016/01/12 2:36, Alvaro Herrera wrote: I wonder, --- 2166,2213 } /* ! * If rel is a base relation, detect whether any system columns are ! * requested from the rel. (If rel

Re: [HACKERS] COPY (... tab completion

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 10:12 AM, Andreas Karlsson wrote: > On 01/19/2016 01:57 AM, Andreas Karlsson wrote: >> >> Thanks for the review. A new version is attached. > > > Whops, attached the wrong file. +/* If we have COPY BINARY, compelete with list of tables */

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-01-18 Thread Tomas Vondra
On 01/19/2016 07:44 AM, Michael Paquier wrote: On Wed, Dec 2, 2015 at 3:24 PM, Michael Paquier wrote: On Wed, Dec 2, 2015 at 3:23 PM, Michael Paquier wrote: On Wed, Dec 2, 2015 at 7:05 AM, Tomas Vondra

  1   2   >