Re: [HACKERS] Patch for fail-back without fresh backup

2013-06-20 Thread Amit Kapila
On Wednesday, June 19, 2013 10:45 PM Sawada Masahiko wrote: On Tuesday, June 18, 2013, Amit Kapila wrote: On Tuesday, June 18, 2013 12:18 AM Sawada Masahiko wrote: On Sun, Jun 16, 2013 at 2:00 PM, Amit kapila amit.kap...@huawei.com wrote: On Saturday, June 15, 2013 8:29 PM Sawada Masahiko

Re: [HACKERS] Add visibility map information to pg_freespace.

2013-06-20 Thread Simon Riggs
On 20 June 2013 04:26, Satoshi Nagayasu sn...@uptime.jp wrote: I'm looking into this patch as a reviewer. (2013/06/19 18:03), Simon Riggs wrote: On 19 June 2013 09:19, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: It should useful in other aspects but it seems a bit complicated

Re: [HACKERS] Re: Adding IEEE 754:2008 decimal floating point and hardware support for it

2013-06-20 Thread Simon Riggs
On 20 June 2013 06:45, Craig Ringer cr...@2ndquadrant.com wrote: I think a good starting point would be to use the Intel and IBM libraries to implement basic DECIMAL32/64/128 to see if they perform better than the gcc builtins tested by Pavel by adapting his extension. If the performance

Re: [HACKERS] Change authentication error message (patch)

2013-06-20 Thread Markus Wanner
On 06/20/2013 12:51 AM, Jeff Janes wrote: I think we need to keep the first password. Password authentication is a single thing, it is the authentication method attempted. It is the password method (which includes MD5) which failed, as opposed to the LDAP method or the Peer method or one of

Re: [HACKERS] Re: Adding IEEE 754:2008 decimal floating point and hardware support for it

2013-06-20 Thread Thomas Munro
On 20 June 2013 06:45, Craig Ringer cr...@2ndquadrant.com wrote: I think a good starting point would be to use the Intel and IBM libraries to implement basic DECIMAL32/64/128 to see if they perform better than the gcc builtins tested by Pavel by adapting his extension. Just a few notes: Not

Re: [HACKERS] Patch for removng unused targets

2013-06-20 Thread Etsuro Fujita
of the patch is attached, which fixed the bug using the approach that directly uses the clause information in the parse tree. Thanks, Best regards, Etsuro Fujit unused-targets-20130620.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] LEFT JOIN LATERAL can remove rows from LHS

2013-06-20 Thread Vik Fearing
On 06/18/2013 01:52 AM, Jeremy Evans wrote: Maybe I am misunderstanding how LATERAL is supposed to work, but my expectation is that doing a LEFT JOIN should not remove rows from the LHS. I have added this to the list of 9.3 blockers. https://wiki.postgresql.org/wiki/PostgreSQL_9.3_Open_Items

Re: [HACKERS] Re: Adding IEEE 754:2008 decimal floating point and hardware support for it

2013-06-20 Thread Thomas Munro
On 20 June 2013 08:05, Thomas Munro mu...@ip9.org wrote: On 20 June 2013 06:45, Craig Ringer cr...@2ndquadrant.com wrote: If the performance isn't interesting it may still be worth adding for compliance reasons, but if we can only add IEEE-compliant decimal FP by using non-SQL-standard type

Re: [HACKERS] Implementing incremental backup

2013-06-20 Thread Magnus Hagander
On Thu, Jun 20, 2013 at 12:18 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Claudio Freire escribió: On Wed, Jun 19, 2013 at 6:20 PM, Stephen Frost sfr...@snowman.net wrote: * Claudio Freire (klaussfre...@gmail.com) wrote: I don't see how this is better than snapshotting at the

Re: [HACKERS] event trigger API documentation?

2013-06-20 Thread Dimitri Fontaine
Peter Eisentraut pete...@gmx.net writes: Random observation in this general area: Regular triggers provide the field Trigger *tg_trigger in the trigger data, which allows you to get the trigger name, OID, and such. Event triggers don't expose anything comparable. That should perhaps be

Re: [HACKERS] Change authentication error message (patch)

2013-06-20 Thread Marko Tiikkaja
On 20/06/2013 08:47, Markus Wanner wrote: On 06/20/2013 12:51 AM, Jeff Janes wrote: I think we need to keep the first password. Password authentication is a single thing, it is the authentication method attempted. It is the password method (which includes MD5) which failed, as opposed to the

[HACKERS] Config reload/restart preview

2013-06-20 Thread Thom Brown
Hi, I've noticed that there's no easy way of checking which settings will change if the config is reloaded, and I think not being able to do this can cause some unfortunate problems. For example, a customer went to change their configuration, just setting log_autovacuum_min_duration to about 20

Re: [HACKERS] Bugfix and new feature for PGXS

2013-06-20 Thread Cédric Villemain
Le jeudi 20 juin 2013 05:26:21, Peter Eisentraut a écrit : On Wed, 2013-06-19 at 20:58 +0200, Cédric Villemain wrote: I believe he answered the proposal to put all headers on the same flat directory, instead of a tree. The headers are used as #include hstore.h #include ltree.h etc.

Re: [HACKERS] Config reload/restart preview

2013-06-20 Thread Magnus Hagander
On Thu, Jun 20, 2013 at 1:04 PM, Thom Brown t...@linux.com wrote: Hi, I've noticed that there's no easy way of checking which settings will change if the config is reloaded, and I think not being able to do this can cause some unfortunate problems. For example, a customer went to change

Re: [HACKERS] Change authentication error message (patch)

2013-06-20 Thread Markus Wanner
On 06/20/2013 12:27 PM, Marko Tiikkaja wrote: My understanding is that the attacker would already have that information since the server would have sent an AuthenticationMD5Password message to get to the error in the first place. And we still reveal the authentication method to the frontend

Re: [HACKERS] Config reload/restart preview

2013-06-20 Thread Pavan Deolasee
On Thu, Jun 20, 2013 at 4:34 PM, Thom Brown t...@linux.com wrote: Hi, I've noticed that there's no easy way of checking which settings will change if the config is reloaded, and I think not being able to do this can cause some unfortunate problems. For example, a customer went to change

Re: [HACKERS] Bugfix and new feature for PGXS

2013-06-20 Thread Cédric Villemain
Opinions all? * Give up on being able to use one extension's header from another entirely, except in the special case of in-tree builds There are already a good number of use cases with only hstore and intarray, I'm in favor of this feature. * Install install-enabled contrib headers into

Re: [HACKERS] Config reload/restart preview

2013-06-20 Thread Thom Brown
On 20 June 2013 13:16, Pavan Deolasee pavan.deola...@gmail.com wrote: On Thu, Jun 20, 2013 at 4:34 PM, Thom Brown t...@linux.com wrote: Hi, I've noticed that there's no easy way of checking which settings will change if the config is reloaded, and I think not being able to do this can

Re: backend hangs at immediate shutdown (Re: [HACKERS] Back-branch update releases coming in a couple weeks)

2013-06-20 Thread MauMau
First, thank you for the review. From: Alvaro Herrera alvhe...@2ndquadrant.com This seems reasonable. Why 10 seconds? We could wait 5 seconds, or 15. Is there a rationale behind the 10? If we said 60, that would fit perfectly well within the already existing 60-second loop in postmaster, but

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2013-06-20 Thread Fabrízio de Royes Mello
On Thu, Jun 20, 2013 at 1:52 AM, Amit Langote amitlangot...@gmail.com wrote: Is it possible to: CREATE [ OR REPLACE | IF NOT EXISTS ] OPERATOR CLASS I am in a situation where I need to conditionally create an operator class (that is, create only if already does not exist). [...] The

Re: [HACKERS] Bugfix and new feature for PGXS

2013-06-20 Thread Peter Eisentraut
On 6/20/13 1:21 AM, Craig Ringer wrote: As you note, the other option is to just refer to extension headers by their unqualified name. I'm *really* not a fan of that idea due to the obvious clash possibilities with Pg's own headers or system headers, especially given that the whole idea of

Re: [HACKERS] Bugfix and new feature for PGXS

2013-06-20 Thread Peter Eisentraut
On 6/20/13 1:21 AM, Craig Ringer wrote: Personally, I'm all for just using the local path when building the module, and the qualified path elsewhere. It requires only a relatively simple change, and I don't think that using hstore.h within hstore, and contrib/hstore/hstore.h elsewhere is of

Re: [HACKERS] Config reload/restart preview

2013-06-20 Thread Dimitri Fontaine
Magnus Hagander mag...@hagander.net writes: Should we have a way of previewing changes that would be applied if we reloaded/restarted the server? Yes, we should. +1 This would go well with something I started working on some time ago (but haven't actually gotten far on at all), which is

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2013-06-20 Thread Amit Langote
On Thu, Jun 20, 2013 at 9:48 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Jun 20, 2013 at 1:52 AM, Amit Langote amitlangot...@gmail.com wrote: Is it possible to: CREATE [ OR REPLACE | IF NOT EXISTS ] OPERATOR CLASS I am in a situation where I need to conditionally

Re: [HACKERS] [PATCH] add long options to pgbench (submission 1)

2013-06-20 Thread Fabien COELHO
Please fix that and re-send the patch. Find attached diff wrt current master. -- Fabien.diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 1303217..f39fed3 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -2109,6 +2109,30 @@ int main(int argc,

Re: [HACKERS] [PATCH] add long options to pgbench (submission 1)

2013-06-20 Thread Fabrízio de Royes Mello
On Thu, Jun 20, 2013 at 9:59 AM, Fabien COELHO coe...@cri.ensmp.fr wrote: Please fix that and re-send the patch. Find attached diff wrt current master. Thanks. -- Fabrízio de Royes Mello Consultoria/Coaching PostgreSQL Blog sobre TI: http://fabriziomello.blogspot.com Perfil Linkedin:

Re: [HACKERS] Config reload/restart preview

2013-06-20 Thread Magnus Hagander
On Thu, Jun 20, 2013 at 2:54 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Magnus Hagander mag...@hagander.net writes: Should we have a way of previewing changes that would be applied if we reloaded/restarted the server? Yes, we should. +1 This would go well with something I started

Re: [HACKERS] MVCC catalog access

2013-06-20 Thread Robert Haas
On Mon, Jun 17, 2013 at 8:12 AM, Andres Freund and...@2ndquadrant.com wrote: So, the biggest issue with the patch seems to be performance worries. I tried to create a worst case scenario: postgres (patched and HEAD) running with: -c shared_buffers=4GB \ -c max_connections=2000 \ -c

Re: [HACKERS] dynamic background workers

2013-06-20 Thread Robert Haas
On Mon, Jun 17, 2013 at 10:45 PM, Peter Eisentraut pete...@gmx.net wrote: On Fri, 2013-06-14 at 17:00 -0400, Robert Haas wrote: Alvaro's work on 9.3, we now have the ability to configure background workers via shared_preload_libraries. But if you don't have the right library loaded at startup

Re: [HACKERS] dynamic background workers

2013-06-20 Thread Markus Wanner
Robert, On 06/14/2013 11:00 PM, Robert Haas wrote: Parallel query, or any subset of that project such as parallel sort, will require a way to start background workers on demand. thanks for continuing this, very much appreciated. Postgres-R and thus TransLattice successfully use a similar

Re: [HACKERS] Request for Patch Feedback: Lag Lead Window Functions Can Ignore Nulls

2013-06-20 Thread Robert Haas
On Tue, Jun 18, 2013 at 6:27 PM, Nicholas White n.j.wh...@gmail.com wrote: Thanks for the reviews. I've attached a revised patch that has the lexer refactoring Alvaro mentions (arbitarily using a goto rather than a bool flag) and uses Jeff's idea of just storing the index of the last non-null

Re: [HACKERS] MVCC catalog access

2013-06-20 Thread Andres Freund
On 2013-06-20 09:45:26 -0400, Robert Haas wrote: With that setup one can create quite a noticeable overhead for the mvcc patch (best of 5): master-optimize: tps = 1261.629474 (including connections establishing) tps = 15121.648834 (excluding connections establishing) dev-optimize:

Re: [HACKERS] dynamic background workers

2013-06-20 Thread Robert Haas
On Thu, Jun 20, 2013 at 9:57 AM, Markus Wanner mar...@bluegap.ch wrote: That sounds like a good simplification. Even if it's an O(n) operation, the n in question here has relatively low practical limits. It's unlikely to be much of a concern, I guess. The constant factor is also very small.

Re: [HACKERS] Vacuum/visibility is busted

2013-06-20 Thread Andres Freund
On 2013-06-19 15:01:44 -0700, Jeff Janes wrote: On Thu, Feb 7, 2013 at 12:01 PM, Andres Freund and...@2ndquadrant.comwrote: On 2013-02-07 11:15:46 -0800, Jeff Janes wrote: Does anyone have suggestions on how to hack the system to make it fast-forward the current transaction id? It

Re: [HACKERS] dump difference between 9.3 and master after upgrade

2013-06-20 Thread Robert Haas
On Tue, Jun 18, 2013 at 12:18 PM, Andrew Dunstan and...@dunslane.net wrote: As I was updating my cross version upgrade tester to include support for the 9.3 branch, I noted this dump difference between the dump of the original 9.3 database and the dump of the converted database, which looks

Re: [HACKERS] dynamic background workers

2013-06-20 Thread Markus Wanner
On 06/20/2013 04:41 PM, Robert Haas wrote: The constant factor is also very small. Generally, I would expect num_worker_processes ~ # CPUs That assumption might hold for parallel querying, yes. In case of Postgres-R, it doesn't. In the worst case, i.e. with a 100% write load, a cluster of n

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2013-06-20 Thread Robert Haas
On Wed, Jun 12, 2013 at 3:00 PM, Peter Eisentraut pete...@gmx.net wrote: On 6/12/13 1:29 PM, Fabrízio de Royes Mello wrote: The attached patch add support to IF NOT EXISTS to CREATE statements listed below: - CREATE AGGREGATE [ IF NOT EXISTS ] ... - CREATE CAST [ IF NOT EXISTS ] ... -

Re: [HACKERS] MVCC catalog access

2013-06-20 Thread Robert Haas
On Thu, Jun 20, 2013 at 10:35 AM, Andres Freund and...@2ndquadrant.com wrote: But I'm still on the fence about whether this is really a valid test. I think it shows that we need to be careful and do further performance evaluations and/or alleviate the pain by making things cheaper (say, a ddl

Re: [HACKERS] MVCC catalog access

2013-06-20 Thread Andres Freund
On 2013-06-20 10:58:59 -0400, Robert Haas wrote: On Thu, Jun 20, 2013 at 10:35 AM, Andres Freund and...@2ndquadrant.com wrote: But I'm still on the fence about whether this is really a valid test. I think it shows that we need to be careful and do further performance evaluations and/or

[HACKERS] Frontend/backend protocol improvements proposal (request).

2013-06-20 Thread Dmitriy Igrishin
Hackers, While developing a C++ client library for Postgres I felt lack of extra information in command tags in the CommandComplete (B) message for the following commands: PREPARE; DEALLOCATE; DECLARE; CLOSE; LISTEN; UNLISTEN; SET; RESET. Namely, for example, users of my library

Re: [HACKERS] Re: Adding IEEE 754:2008 decimal floating point and hardware support for it

2013-06-20 Thread Andres Freund
On 2013-06-20 13:45:24 +0800, Craig Ringer wrote: On 06/12/2013 07:51 PM, Andres Freund wrote: On 2013-06-12 19:47:46 +0800, Craig Ringer wrote: On 06/12/2013 05:55 PM, Greg Stark wrote: On Wed, Jun 12, 2013 at 12:56 AM, Craig Ringer cr...@2ndquadrant.com wrote: The main thing I'm

Re: [HACKERS] dump difference between 9.3 and master after upgrade

2013-06-20 Thread Andrew Dunstan
On 06/20/2013 10:43 AM, Robert Haas wrote: On Tue, Jun 18, 2013 at 12:18 PM, Andrew Dunstan and...@dunslane.net wrote: As I was updating my cross version upgrade tester to include support for the 9.3 branch, I noted this dump difference between the dump of the original 9.3 database and the

Re: [HACKERS] dynamic background workers

2013-06-20 Thread Robert Haas
On Thu, Jun 20, 2013 at 10:59 AM, Markus Wanner mar...@bluegap.ch wrote: On 06/20/2013 04:41 PM, Robert Haas wrote: The constant factor is also very small. Generally, I would expect num_worker_processes ~ # CPUs That assumption might hold for parallel querying, yes. In case of Postgres-R,

Re: [HACKERS] dynamic background workers

2013-06-20 Thread Andres Freund
On 2013-06-20 11:29:27 -0400, Robert Haas wrote: Do you mean pre-forking and connecting to a specific database? Or really just the forking? I've considered both at various times, although in this context I was mostly thinking about just the forking. Pre-connecting to a specific database

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2013-06-20 Thread Peter Eisentraut
On 6/20/13 11:04 AM, Robert Haas wrote: I kind of don't see the point of having IF NOT EXISTS for things that have OR REPLACE, and am generally in favor of implementing OR REPLACE rather than IF NOT EXISTS where possible. I tend to agree. Btw., I also want REPLACE BUT DO NOT CREATE. That's

Re: backend hangs at immediate shutdown (Re: [HACKERS] Back-branch update releases coming in a couple weeks)

2013-06-20 Thread Alvaro Herrera
MauMau escribió: First, thank you for the review. From: Alvaro Herrera alvhe...@2ndquadrant.com This seems reasonable. Why 10 seconds? We could wait 5 seconds, or 15. Is there a rationale behind the 10? If we said 60, that would fit perfectly well within the already existing 60-second

Re: [HACKERS] pgbench --startup option

2013-06-20 Thread Jeff Janes
On Sun, Jun 16, 2013 at 9:42 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Thu, May 2, 2013 at 11:25 AM, Fabien COELHO coe...@cri.ensmp.frwrote: Thanks for doing the review. I'm not sure what things to go change without further feedback/discussion, except point 4. I'll wait a day to

Re: [HACKERS] Fix pgstattuple/pgstatindex to use regclass-type as the argument

2013-06-20 Thread Fujii Masao
On Thu, Jun 20, 2013 at 11:43 AM, Satoshi Nagayasu sn...@uptime.jp wrote: (2013/06/17 4:02), Fujii Masao wrote: On Sat, Mar 9, 2013 at 3:23 PM, Satoshi Nagayasu sn...@uptime.jp wrote: It is obviously easy to keep two types of function interfaces, one with regclass-type and another with

Re: [HACKERS] pgbench --startup option

2013-06-20 Thread Fabien COELHO
I've fixed a conflict, and I've removed extraneous semicolons from the C. I've left in the fixing of some existing bad indenting in the existing code, which is not strictly related to my change. There are still unrelated changes : spacing on -c and -t options' help. The pgindent command is

Re: [HACKERS] [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-06-20 Thread Bruce Momjian
On Thu, Jun 13, 2013 at 11:57:27AM -0500, Merlin Moncure wrote: But, couldn't that be solved by deprecating that function and providing a more sensible alternatively named version? And what would you name that function? array_dims2? I can't think of a name that makes the difference in

Re: FILTER for aggregates [was Re: [HACKERS] Department of Redundancy Department: makeNode(FuncCall) division]

2013-06-20 Thread Dean Rasheed
On 17 June 2013 06:36, David Fetter da...@fetter.org wrote: Please find attached two versions of a patch which provides optional FILTER clause for aggregates (T612, Advanced OLAP operations). The first is intended to be applied on top of the previous patch, the second without it.

Re: [HACKERS] [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-06-20 Thread Merlin Moncure
On Thu, Jun 20, 2013 at 2:58 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Jun 13, 2013 at 11:57:27AM -0500, Merlin Moncure wrote: But, couldn't that be solved by deprecating that function and providing a more sensible alternatively named version? And what would you name that

Re: backend hangs at immediate shutdown (Re: [HACKERS] Back-branch update releases coming in a couple weeks)

2013-06-20 Thread MauMau
From: Alvaro Herrera alvhe...@2ndquadrant.com I will go with 5 seconds, then. OK, I agree. My point is that there is no difference. For one thing, once we enter immediate shutdown state, and sigkill has been sent, no further action is taken. Postmaster will just sit there indefinitely

Re: [HACKERS] changeset generation v5-01 - Patches git tree

2013-06-20 Thread Kevin Grittner
Andres Freund and...@2ndquadrant.com wrote: 0007: Adjust Satisfies* interface: required, mechanical, Version v5-01 attached I'm still working on a review and hope to post something more substantive by this weekend, but when applying patches in numeric order, this one did not compile cleanly.

[HACKERS] isolationtester and 'specs' subdirectory

2013-06-20 Thread Josh Kupershmidt
Hi all, I have a Debian machine with gcc 4.7.2-5 where make check-world fails in the isolation check, like so: ... make[2]: Leaving directory `/home/josh/src/postgresql/src/test/regress' make -C isolation check [snip] gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith

[HACKERS] Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)

2013-06-20 Thread Noah Misch
On Thu, Jun 20, 2013 at 12:33:25PM -0400, Alvaro Herrera wrote: MauMau escribi?: Here, reliable means that the database server is certainly shut down when pg_ctl returns, not telling a lie that I shut down the server processes for you, so you do not have to be worried that some postgres

Re: [HACKERS] [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-06-20 Thread Bruce Momjian
On Thu, Jun 20, 2013 at 03:33:24PM -0500, Merlin Moncure wrote: On Thu, Jun 20, 2013 at 2:58 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Jun 13, 2013 at 11:57:27AM -0500, Merlin Moncure wrote: But, couldn't that be solved by deprecating that function and providing a more sensible

Re: [HACKERS] [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-06-20 Thread Merlin Moncure
On Thu, Jun 20, 2013 at 6:40 PM, Bruce Momjian br...@momjian.us wrote: Kinda -- what I'm saying is you just don't go around changing function behaviors to make them 'better' unless the affected behavior was specifically reserved as undefined. The fact is nobody knows how many users will be

Re: [HACKERS] [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-06-20 Thread Bruce Momjian
On Thu, Jun 20, 2013 at 07:13:48PM -0500, Merlin Moncure wrote: On Thu, Jun 20, 2013 at 6:40 PM, Bruce Momjian br...@momjian.us wrote: Kinda -- what I'm saying is you just don't go around changing function behaviors to make them 'better' unless the affected behavior was specifically

Re: [HACKERS] [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-06-20 Thread Josh Berkus
Bruce, Well, sometimes we underestimate the impact of changes, sometimes we overestimate. The big problem is weighing the short-term problems of change but not the long-term benefit of a change. This array problem goes back to at least 2008:

[HACKERS] Why can't I use windowing functions over ordered aggregates?

2013-06-20 Thread Josh Berkus
Hackers, So, I can create a custom aggregate first and do this: SELECT first(val order by ts desc) ... And I can do this: SELECT first_value(val) OVER (order by ts desc) ... but I can't do this: SELECT first_value(val order by ts desc) ... even though under the hood, it's the exact same

Re: [HACKERS] [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-06-20 Thread Bruce Momjian
On Thu, Jun 20, 2013 at 06:28:07PM -0700, Josh Berkus wrote: Bruce, Well, sometimes we underestimate the impact of changes, sometimes we overestimate. The big problem is weighing the short-term problems of change but not the long-term benefit of a change. This array problem goes back

[HACKERS] trgm regex index peculiarity

2013-06-20 Thread Erik Rijkers
9.4devel (but same in 9.3) In a 112 MB test table (containing random generated text) with a trgm index (gin_trgm_ops), I consistently get these timings: select txt from azjunk6 where txt ~ '^abcd'; 130 ms select txt from azjunk6 where txt ~ 'abcd' and substr(txt,1,4) = 'abcd'; 3 ms (a

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-20 Thread Jeff Davis
On Sun, 2013-06-16 at 23:53 -0500, Jon Nelson wrote: Please find attached v5 of the patch, with the above correction in place. The only change from the v4 patch is wrapping the if (wal_use_fallocate) block in an #ifdef USE_POSIX_FALLOCATE. Thanks! Thank you. Greg, are you still working on

[HACKERS] Support for RANGE ... PRECEDING windows in OVER

2013-06-20 Thread Craig Ringer
Hi all Since 8.4, PostgreSQL has had extremely useful window function support - but support for RANGE PRECEDING / FOLLOWING windows was dropped late in 8.4's development in order to get the rest of the feature in, per http://archives.postgresql.org/pgsql-hackers/2010-02/msg00540.php. It looks

Re: [HACKERS] Support for RANGE ... PRECEDING windows in OVER

2013-06-20 Thread Ian Link
I am currently looking into this feature. However, as I am quite new to Postgres, I think it might take me a while to get up to speed. Anyways, I would also appreciate another round of discussion on the future of the windowing functions. Ian Link Craig Ringer Thursday,

[HACKERS] Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)

2013-06-20 Thread Alvaro Herrera
Noah Misch escribió: On Thu, Jun 20, 2013 at 12:33:25PM -0400, Alvaro Herrera wrote: MauMau escribi?: Here, reliable means that the database server is certainly shut down when pg_ctl returns, not telling a lie that I shut down the server processes for you, so you do not have to be

Re: [HACKERS] Support for RANGE ... PRECEDING windows in OVER

2013-06-20 Thread Craig Ringer
On 06/21/2013 10:31 AM, Ian Link wrote: I am currently looking into this feature. However, as I am quite new to Postgres, I think it might take me a while to get up to speed. Anyways, I would also appreciate another round of discussion on the future of the windowing functions. Good to know,

Re: backend hangs at immediate shutdown (Re: [HACKERS] Back-branch update releases coming in a couple weeks)

2013-06-20 Thread Alvaro Herrera
MauMau escribió: From: Alvaro Herrera alvhe...@2ndquadrant.com One concern is that umount would fail in such a situation because postgres has some open files on the filesystem, which is on the shared disk in case of traditional HA cluster. See my reply to Noah. If postmaster stays around,

Re: [HACKERS] Support for RANGE ... PRECEDING windows in OVER

2013-06-20 Thread Ian Link
Thanks! The discussions have been useful, although I am currently just reviewing the code. I think a good starting point will be to refactor/imrpove the WinGetFuncArgInPartition and WinGetFuncArgInFrame functions. Tom Lane wrote this about them before comitting the patch: I'm not terribly

Re: [HACKERS] single-user vs standalone in docs and messages

2013-06-20 Thread Peter Eisentraut
On Thu, 2013-06-13 at 15:10 -0700, Jeff Janes wrote: Some places in the docs and elog hints refer to standalone backends, while the official name as used in app-postgres.html is single-user mode, and in fact standalone does not appear on that page. This tries to standardize the other

Re: [HACKERS] trgm regex index peculiarity

2013-06-20 Thread Tom Lane
Erik Rijkers e...@xs4all.nl writes: In a 112 MB test table (containing random generated text) with a trgm index (gin_trgm_ops), I consistently get these timings: select txt from azjunk6 where txt ~ '^abcd'; 130 ms select txt from azjunk6 where txt ~ 'abcd' and substr(txt,1,4) = 'abcd';

Re: FILTER for aggregates [was Re: [HACKERS] Department of Redundancy Department: makeNode(FuncCall) division]

2013-06-20 Thread David Fetter
On Thu, Jun 20, 2013 at 08:59:27PM +0100, Dean Rasheed wrote: On 17 June 2013 06:36, David Fetter da...@fetter.org wrote: Please find attached two versions of a patch which provides optional FILTER clause for aggregates (T612, Advanced OLAP operations). The first is intended to be

[HACKERS] Pglife and back-branch commits

2013-06-20 Thread Bruce Momjian
Alvaro asked me to add the display of post minor-release commits to PgLife (http://pglife.momjian.us/). I have added a link to that information as a plus-sign after each minor release number, e.g. Stable: 9.2.4+, 9.1.9+, 9.0.13+, 8.4.17+. Hopefully this will be helpful in us scheduling minor

Re: FILTER for aggregates [was Re: [HACKERS] Department of Redundancy Department: makeNode(FuncCall) division]

2013-06-20 Thread Alvaro Herrera
David Fetter escribió: On Thu, Jun 20, 2013 at 08:59:27PM +0100, Dean Rasheed wrote: In my testing of sub-queries in the FILTER clause (an extension to the spec), I was able to produce the following error: Per the spec, B) A filter clause shall not contain a query expression, a window

Re: FILTER for aggregates [was Re: [HACKERS] Department of Redundancy Department: makeNode(FuncCall) division]

2013-06-20 Thread David Fetter
On Fri, Jun 21, 2013 at 12:10:25AM -0400, Alvaro Herrera wrote: David Fetter escribió: On Thu, Jun 20, 2013 at 08:59:27PM +0100, Dean Rasheed wrote: In my testing of sub-queries in the FILTER clause (an extension to the spec), I was able to produce the following error: Per the

Re: [HACKERS] Request for Patch Feedback: Lag Lead Window Functions Can Ignore Nulls

2013-06-20 Thread Jeff Davis
On Thu, 2013-06-20 at 10:03 -0400, Robert Haas wrote: I think the question is whether this feature is really worth adding new reserved keywords for. I have a hard time saying we shouldn't support something that's part of the SQL standard, but personally, it's not something I've seen come up

Re: backend hangs at immediate shutdown (Re: [HACKERS] Back-branch update releases coming in a couple weeks)

2013-06-20 Thread Alvaro Herrera
Actually, I think it would be cleaner to have a new state in pmState, namely PM_IMMED_SHUTDOWN which is entered when we send SIGQUIT. When we're in this state, postmaster is only waiting for the timeout to expire; and when it does, it sends SIGKILL and exits. Pretty much the same you have,

Re: [HACKERS] Config reload/restart preview

2013-06-20 Thread Gurjeet Singh
On Thu, Jun 20, 2013 at 9:33 AM, Magnus Hagander mag...@hagander.netwrote: On Thu, Jun 20, 2013 at 2:54 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Magnus Hagander mag...@hagander.net writes: Should we have a way of previewing changes that would be applied if we reloaded/restarted

Re: FILTER for aggregates [was Re: [HACKERS] Department of Redundancy Department: makeNode(FuncCall) division]

2013-06-20 Thread David Fetter
On Fri, Jun 21, 2013 at 12:10:25AM -0400, Alvaro Herrera wrote: David Fetter escribió: On Thu, Jun 20, 2013 at 08:59:27PM +0100, Dean Rasheed wrote: In my testing of sub-queries in the FILTER clause (an extension to the spec), I was able to produce the following error: Per the