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 th

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

2016-01-18 Thread Tomas Vondra
On 01/19/2016 08:03 AM, Michael Paquier wrote: On Tue, Jan 19, 2016 at 3:58 PM, Tomas Vondra wrote: ... Tomas, I am planning to have a look at that, because it seems to be important. In case it becomes lost on my radar, do you mind if I add it to the 2016-03 CF? Well, what else can I do

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 standing >> problems of unneccessary checkpoints with

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

2016-01-18 Thread Michael Paquier
On Mon, Jan 18, 2016 at 10:19 PM, Amit Kapila wrote: > 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 >> > >> > wrote: >> >> >> >> >> >> >> > >> > So here if I understa

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

2016-01-18 Thread Michael Paquier
On Tue, Jan 19, 2016 at 3:58 PM, Tomas Vondra wrote: > > > 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

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 S

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 wrote: Attached is v2 of the patch, that (a) adds explicit fsync on the parent directo

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 */ s/compelete/complete +els

Re: [HACKERS] jsonb array-style subscription

2016-01-18 Thread Michael Paquier
On Mon, Jan 18, 2016 at 9:32 PM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > I've cleaned up the code, created a separate JsonbRef node (and there are a > lot of small changes because of that), abandoned an idea of "deep nesting" > of assignments (because it doesn't relate to jsonb subscription,

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 i

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 >>> >>> (a) adds explicit fsync on the parent directory after all the rename() >>>

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

2016-01-18 Thread Michael Paquier
On Thu, Jan 7, 2016 at 5:36 PM, Kyotaro HORIGUCHI wrote: > Finally, PsqlScanState has four callback funcions and all pgbench > needs to do to use it is setting NULL to all of them and link the > object file in psql directory. No link switch/ifdef are necessary. Am I missing something? This patch

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2016-01-18 Thread Michael Paquier
On Mon, Jan 18, 2016 at 5:01 AM, Dean Rasheed wrote: > On 30 November 2015 at 14:11, Tom Lane wrote: >> FWIW, I think that probably the best course of action is to go ahead >> and install POSIX-compliant error checking in the existing functions >> too. POSIX:2008 is quite clear about this: >> >>

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, Alvaro Herrera wrote: >>> * Confirm value of pg_stat_replication.sync_state (sy

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 contract for an expanded object took me quite a while > >>> to puzzle out, but it seems t

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 quite a while to puzzle out, but it seems to be this: if somebody han

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 hashaggregate is too slow? >> >> >> Good question. I looked at

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 I'

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: >> >> http://www.postgresql.org/message-id/CAB7nPqQXghm_SdB5iniupz1atzM

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 mailto:pavel.steh...@gmail.com>> wrote: ... It is strange, why hashaggregate is too slow? Good question. I looked at this and found my VM was swapping like crazy. Upon investigation it appears th

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 > compilers (their convers

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 instead. > > Thanks for the new patch. > > +

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 rather than > > any other

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] 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 moving > > > it to the next as a bug fix. > > > > I f

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 TransactionContext not causing any

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 seems to be this: if somebody hands you an R/W >>> pointer to an expa

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] 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 result

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 >> > : >> >> On Mon, Jan 4, 2016 at 4:51 PM, Robert Haas wrote: >> >> >> >> I'm also inclined on drop

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 work for refactoring the tranches for LWLocks [1] > >

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

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 mentions are somewhat ann

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 = PG_ARGISNULL(0) ? NULL : (text *) PG_GETARG_POINTER(0); > state = (Po

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 a/src/backend/cat

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] 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 databases*, > >> pg_u

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 +++ b/src/bin/psql/ta

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] , comp

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 SSD, and my personal laptop

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 wrote: > 1) Change

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 views and system function, that's my point t

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 these get a copyrigh

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 g

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), > + errmsg("size cannot be negative"))); > > Why

Re: [HACKERS] jsonb - jsonb operators

2016-01-18 Thread Vitaly Burovoy
On 1/15/16, Glyn Astill wrote: > Hi all, > > I was just looking through the new jsonb operators in the 9.5 release, and > was wondering if there's any future intention to add a delete operator that > removes element/pair matches? I.e. some sort of top-level "jsonb - jsonb" > operator, e.g. > > >

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

2016-01-18 Thread Andres Freund
On 2016-01-18 16:56:22 -0600, Kevin Grittner wrote: > On Mon, Jan 18, 2016 at 4:50 PM, Andres Freund wrote: > > > Now I'm equally unconvinced that it's worthwhile to do anything > > here. I just don't think benchmarking plays a role either way. > > Well, that would be the crucial point on which

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

2016-01-18 Thread Kevin Grittner
On Mon, Jan 18, 2016 at 4:50 PM, Andres Freund wrote: > Now I'm equally unconvinced that it's worthwhile to do anything > here. I just don't think benchmarking plays a role either way. Well, that would be the crucial point on which we differ -- the rest is all agreement. I don't think we should

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

2016-01-18 Thread Peter Geoghegan
On Mon, Jan 18, 2016 at 2:39 PM, Kevin Grittner wrote: >> but I don't think that Andreas' patch is necessarily a >> performance patch. There can be value in removing superfluous >> code; doing so sometimes clarifies intent and understanding. > > Well, that's why I said I would be satisfied with a

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

2016-01-18 Thread Andres Freund
On 2016-01-18 16:14:05 -0600, Kevin Grittner wrote: > Unconvinced that we should do performance testing on a proposed > performance patch before accepting it I'm unconvinced that it makes sense to view this as a performance patch. And unconvinced that you can sanely measure it. The lock prefix is

Re: [HACKERS] Buildfarm server move

2016-01-18 Thread Andrew Dunstan
On 01/18/2016 05:20 PM, Andrew Dunstan wrote: People, Apologies for the late notice. Tomorrow, January 18th, at 4.00 pm US East Coast time (UT - 5.0) we will be moving the buildfarm server from its current home at CommandPrompt, where we have been ever since we started, to a machine that i

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

2016-01-18 Thread 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 rather than > any other number, which to me is a clear-cut sign that this needs

Re: [HACKERS] Buildfarm server move

2016-01-18 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Andrew Dunstan writes: > > Tomorrow, January 18th, at 4.00 pm US East Coast time (UT - 5.0) we will > > be moving the buildfarm server from its current home at CommandPrompt, > > Um, this message is postmarked 18 Jan 17:20, an hour later than

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Andres Freund
On January 18, 2016 11:10:35 PM GMT+01:00, Stephen Frost wrote: >* Robert Haas (robertmh...@gmail.com) wrote: >> On Mon, Jan 18, 2016 at 4:43 AM, Andres Freund >wrote: >> > Meh, that seems pretty far into pseudo security arguments. >> >> Yeah, I really don't see anything in the pg_controldata o

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

2016-01-18 Thread Kevin Grittner
On Mon, Jan 18, 2016 at 4:24 PM, Peter Geoghegan wrote: > On Mon, Jan 18, 2016 at 2:14 PM, Kevin Grittner wrote: >> It's hard to understand quite what you're saying there. If you're >> saying that code changes that should be performance neutral can >> sometimes affect performance because of ali

Re: [HACKERS] Buildfarm server move

2016-01-18 Thread Tom Lane
Andrew Dunstan writes: > Tomorrow, January 18th, at 4.00 pm US East Coast time (UT - 5.0) we will > be moving the buildfarm server from its current home at CommandPrompt, Um, this message is postmarked 18 Jan 17:20, an hour later than the stated move time. Did you mean the move will be Tue 19

[HACKERS] Random inconsistencies in GiST support function declarations

2016-01-18 Thread Tom Lane
I was idly trying to improve the just-added index AM amvalidate() functions by having them verify the expected signatures (argument and result types) of opclass support functions. opr_sanity currently does this for btree, hash, and spgist functions, but not for other cases; it'd be useful IMO if w

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

2016-01-18 Thread Peter Geoghegan
On Mon, Jan 18, 2016 at 2:14 PM, Kevin Grittner wrote: >> You get just as much churn by changing code elsewhere, which >> often causes code movement and alignment changes. > > It's hard to understand quite what you're saying there. If you're > saying that code changes that should be performance n

[HACKERS] Buildfarm server move

2016-01-18 Thread Andrew Dunstan
People, Apologies for the late notice. Tomorrow, January 18th, at 4.00 pm US East Coast time (UT - 5.0) we will be moving the buildfarm server from its current home at CommandPrompt, where we have been ever since we started, to a machine that is part of the standard core infrastructure. In do

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

2016-01-18 Thread Kevin Grittner
On Mon, Jan 18, 2016 at 3:47 PM, Andres Freund wrote: > On January 18, 2016 10:42:42 PM GMT+01:00, Kevin Grittner > wrote: >> I took a look at this and agree that the shorter, simpler code >> proposed in this patch should make no *logical* difference, and >> looks like it *should* have a neutra

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Jan 18, 2016 at 4:43 AM, Andres Freund wrote: > > Meh, that seems pretty far into pseudo security arguments. > > Yeah, I really don't see anything in the pg_controldata output that > looks sensitive. The WAL locations are the closest of anyt

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Joe Conway
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 wrote: 1) Change NextXID output format from "%u/%u" to "%u:%u" (see recent hacke

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Robert Haas
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 views and system function, that's my point to do the same >> here. > > We are? pg_current_xlog_insert_

[HACKERS] Re: pglogical_output - a general purpose logical decoding output plugin

2016-01-18 Thread Tomasz Rybak
I just quickly went through patch v5. It's rather big patch, on (or beyond) my knowledge of PostgreSQL to perform high-quality review. But during this week I'll try to send reviews of parts of the code, as going through it in one sitting seems impossible. One proposed change - update copyright t

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 4:35 PM, Pavel Stehule wrote: >> I know that Oracle uses syntax of this general type, but I've always >> found it ugly. It's also pretty non-extensible. You could want >> similar things for range types and any other container types we might >> get in the future, but clear

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

2016-01-18 Thread Andres Freund
On January 18, 2016 10:42:42 PM GMT+01:00, Kevin Grittner wrote: >On Mon, Jan 18, 2016 at 3:04 PM, Andres Freund >wrote: >> On January 18, 2016 7:27:59 PM GMT+01:00, Robert Haas > wrote: >>> On Sun, Jan 17, 2016 at 6:38 AM, Andreas Seltenreich > wrote: > While discussing issues with its dev

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-18 Thread Bruce Momjian
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 wrote: > >> 1) Change NextXID output format from "%u/%u" to "%u:%u" > >>(see recent hackers thread) > > > > ! printf(_("Latest check

Re: [HACKERS] pglogical_output - a general purpose logical decoding output plugin

2016-01-18 Thread Tomasz Rybak
W dniu 07.01.2016, czw o godzinie 15∶50 +0800, użytkownik Craig Ringer napisał: > On 7 January 2016 at 01:17, Peter Eisentraut wrote: > > On 12/22/15 4:55 AM, Craig Ringer wrote: > > > I'm a touch frustrated by that, as a large part of the point of > > > submitting the output plugin separately and

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
Robert Haas writes: > 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 rather than > any other number, which to me is a clear-cut sign that this nee

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

2016-01-18 Thread Kevin Grittner
On Mon, Jan 18, 2016 at 3:04 PM, Andres Freund wrote: > On January 18, 2016 7:27:59 PM GMT+01:00, Robert Haas > wrote: >> On Sun, Jan 17, 2016 at 6:38 AM, Andreas Seltenreich >> wrote: >>> While discussing issues with its developers, it was pointed out to me >>> that our spinlock inline assem

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-01-18 Thread Pavel Stehule
2016-01-18 22:21 GMT+01:00 Robert Haas : > On Mon, Jan 18, 2016 at 3:51 PM, Alvaro Herrera > wrote: > > BTW are we all agreed that enabling > > foo%ARRAYTYPE > > and > > foo%ELEMENTYPE > > in plpgsql's DECLARE section is what we want for this? > > I know that Oracle uses syntax of this genera

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

2016-01-18 Thread Robert Haas
On Wed, Jan 13, 2016 at 10:47 AM, 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 (requires replans) or OLTP-like (does not >> r

Re: [HACKERS] system mingw not recognized

2016-01-18 Thread Andrew Dunstan
On 01/18/2016 04:11 PM, Igal @ Lucee.org wrote: I posted the error in the docs to pgsql-d...@postgresql.org If it's possible to update it myself via git, or if it should be reported elsewhere -- please advise. 1. Please don't top-post on the PostgreSQL lists. See

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

2016-01-18 Thread Andrew Dunstan
On 01/18/2016 03:46 PM, Alvaro Herrera wrote: Andrew Dunstan wrote: On 01/18/2016 12:38 PM, Alvaro Herrera wrote: 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

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 3:51 PM, Alvaro Herrera wrote: > BTW are we all agreed that enabling > foo%ARRAYTYPE > and > foo%ELEMENTYPE > in plpgsql's DECLARE section is what we want for this? I know that Oracle uses syntax of this general type, but I've always found it ugly. It's also pretty no

Re: [HACKERS] Tsvector editing functions

2016-01-18 Thread Alvaro Herrera
So, Tomas, Teodor, did you like this new version of the patch? Stas Kelvich wrote: > > 7) Some of the functions use intexterm that does not match the function > > name. I see two such cases - to_tsvector and setweight. Is there a > > reason for that? > > Because sgml compiler wants unique in

Re: [HACKERS] system mingw not recognized

2016-01-18 Thread Igal @ Lucee.org
I posted the error in the docs to pgsql-d...@postgresql.org If it's possible to update it myself via git, or if it should be reported elsewhere -- please advise. On 1/18/2016 12:59 PM, Igal @ Lucee.org wrote: It looks like the docs are indeed wrong. According to http://sourceforge.net/p/min

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

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 2:42 PM, Igal @ Lucee.org wrote: > 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. Cool. Man, Windows anti-virus software is

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

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 2:26 PM, Tom Lane wrote: > 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 exactl

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

2016-01-18 Thread Andres Freund
On January 18, 2016 7:27:59 PM GMT+01:00, Robert Haas wrote: >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 in

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 Mon, Jan 18, 2016 at 02:14:11PM -0500, Tom Lane wrote: > 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 dis

Re: [HACKERS] system mingw not recognized

2016-01-18 Thread Igal @ Lucee.org
It looks like the docs are indeed wrong. According to http://sourceforge.net/p/mingw-w64/wiki2/TypeTriplets/ it should be x86_64-w64-mingw32 So in summary, the docs at http://www.postgresql.org/docs/current/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW should be updated from

[HACKERS] source files without copyright notices

2016-01-18 Thread Joe Conway
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 these get a copyright? Joe -- Crunchy Data - http://crunchydata.com PostgreSQL

[HACKERS] system mingw not recognized

2016-01-18 Thread Igal @ Lucee.org
Per the docs at http://www.postgresql.org/docs/current/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW "To build 64 bit binaries using MinGW ... and run configure with the --host=x86_64-w64-mingw option" But when I try to run: $ ~/sources/postgresql-9.5.0/configure --host=x86

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-01-18 Thread Alvaro Herrera
FWIW the reason I read through this patch is that I wondered if there was anything in common with this other patch https://commitfest.postgresql.org/8/459/ -- and the answer seems to be "no". What that patch does is add a new construct TYPE(1+1) which in this case returns "int4"; I guess if we

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

2016-01-18 Thread Peter Geoghegan
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 SSD, and my personal laptop > also has an SSD, but their immediate

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

2016-01-18 Thread Alvaro Herrera
Andrew Dunstan wrote: > > > On 01/18/2016 12:38 PM, Alvaro Herrera wrote: > >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 build

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-01-18 Thread Alvaro Herrera
> diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c > new file mode 100644 > index 1ae4bb7..c819517 > *** a/src/pl/plpgsql/src/pl_comp.c > --- b/src/pl/plpgsql/src/pl_comp.c > *** plpgsql_parse_tripword(char *word1, char > *** 1617,1622 > --- 1617,1677 >

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

2016-01-18 Thread Robert Haas
On Mon, Jan 18, 2016 at 1:44 AM, David Fetter wrote: > On Sun, Jan 17, 2016 at 11:13:33PM -0500, Bruce Momjian wrote: >> On Thu, Jan 7, 2016 at 02:30:06PM -0600, Jim Nasby wrote: >> > https://queue.acm.org/detail.cfm?id=2874238 discusses how modern >> > Storage Class Memory (SCM), such as PCIe SS

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

2016-01-18 Thread Andrew Dunstan
On 01/18/2016 12:38 PM, Alvaro Herrera wrote: 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 :-) Why would I? This is

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

2016-01-18 Thread Peter Geoghegan
On Mon, Jan 18, 2016 at 11:56 AM, Alvaro Herrera wrote: >> That's because I believe this is quite broken, as already pointed out. > > I think I like your approach better. That makes things far simpler, then. >> Your premise here is that what Heikki said in passing months ago is >> incontrovertib

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 we should mark this rejected

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 don't refuse. I just don't w

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 1/1

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 invariant is for the maps, and if it's >> oka

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 reek of broken Windows

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" , "pgsql-hackers@postgresql.org" Date: Monday, 18 January, 2016, 16:50 Dmitry Do

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 another? > Checking sele

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 > -fwrapv -fexcess-precis

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 (requires replans) or OLTP-like (doe

  1   2   >