Re: [HACKERS] WITH CHECK OPTION for auto-updatable views

2013-06-21 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: > Here's an updated version --- I missed the necessary update to the > check_option column of information_schema.views. Thanks! This is really looking quite good, but it's a bit late and I'm going on vacation tomorrow, so I didn't quite want

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-06-21 Thread Amit kapila
On Friday, June 21, 2013 11:43 PM Robert Haas wrote: On Fri, Jun 21, 2013 at 12:56 PM, Fujii Masao wrote: > On Sat, Jun 22, 2013 at 12:11 AM, Robert Haas wrote: >> On Wed, Jun 19, 2013 at 1:59 PM, Peter Eisentraut wrote: >>> On 6/7/13 12:14 AM, Amit Kapila wrote: > I will change the patch as

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-06-21 Thread Amit kapila
On Friday, June 21, 2013 11:48 PM Robert Haas wrote: On Thu, Jun 20, 2013 at 12:18 AM, Amit Kapila wrote: >> Auto.conf- 1 Vote (Josh) >> System.auto.conf - 1 Vote (Josh) >> Postgresql.auto.conf - 2 Votes (Zoltan, Amit) >> Persistent.auto.conf - 0 Vote >> generated_by_server.conf -

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-06-21 Thread Michael Paquier
On Fri, Jun 21, 2013 at 10:47 PM, Andres Freund wrote: > Hm. Looking at how this is currently used - I am afraid it's not > correct... the reason RelationGetIndexList() returns a copy is that > cache invalidations will throw away that list. And you do index_open() > while iterating over it which w

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

2013-06-21 Thread Craig Ringer
On 06/22/2013 03:30 AM, ian link wrote: > Forgive my ignorance, but I don't entirely understand the problem. What > does '+' and '-' refer to exactly? Consider "RANGE 4.5 PRECEDING'. You need to be able to test whether, for the current row 'b', any given row 'a' is within the range (b - 4.5) < a

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

2013-06-21 Thread Tom Lane
Robert Haas writes: > On Fri, Jun 21, 2013 at 5:44 PM, Tom Lane wrote: >> The traditional theory has been that that would be less robust, not >> more so. Child backends are (mostly) able to carry out queries whether >> or not the postmaster is around. > I think that's the Tom Lane theory. The

Re: [HACKERS] problem with commitfest redirection

2013-06-21 Thread Martín Marqués
El 21/06/13 23:47, Jaime Casanova escribió: On Fri, Jun 21, 2013 at 8:56 PM, Martín Marqués wrote: When ever I try to see the patch from this commit it never loads: https://commitfest.postgresql.org/action/patch_view?id=1129 Some problem there? I can see other patches, from other commits.

Re: [HACKERS] problem with commitfest redirection

2013-06-21 Thread Jaime Casanova
On Fri, Jun 21, 2013 at 8:56 PM, Martín Marqués wrote: > When ever I try to see the patch from this commit it never loads: > > https://commitfest.postgresql.org/action/patch_view?id=1129 > > Some problem there? I can see other patches, from other commits. > Yes, the URL is wrong. right URL is htt

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

2013-06-21 Thread MauMau
From: "Robert Haas" On Fri, Jun 21, 2013 at 2:55 PM, Tom Lane wrote: Robert Haas writes: More generally, what do we think the point is of sending SIGQUIT rather than SIGKILL in the first place, and why does that point cease to be valid after 5 seconds? Well, mostly it's about telling the c

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

2013-06-21 Thread MauMau
From: "Robert Haas" On Thu, Jun 20, 2013 at 12:33 PM, Alvaro Herrera wrote: I will go with 5 seconds, then. I'm uncomfortable with this whole concept, and particularly with such a short timeout. On a very busy system, things can take a LOT longer than they think we should; it can take 30 se

[HACKERS] problem with commitfest redirection

2013-06-21 Thread Martín Marqués
When ever I try to see the patch from this commit it never loads: https://commitfest.postgresql.org/action/patch_view?id=1129 Some problem there? I can see other patches, from other commits. -- Martín Marquéshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Train

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-06-21 Thread Michael Paquier
OK let's finalize this patch first. I'll try to send an updated patch within today. On Fri, Jun 21, 2013 at 10:47 PM, Andres Freund wrote: > On 2013-06-21 20:54:34 +0900, Michael Paquier wrote: >> On Fri, Jun 21, 2013 at 6:19 PM, Andres Freund >> wrote: >> > On 2013-06-19 09:55:24 +0900, Michae

Re: [HACKERS] Implementing incremental backup

2013-06-21 Thread Jehan-Guillaume (ioguix) de Rorthais
On 20/06/2013 03:25, Tatsuo Ishii wrote: >> On Wed, Jun 19, 2013 at 8:40 PM, Tatsuo Ishii wrote: On Wed, Jun 19, 2013 at 6:20 PM, Stephen Frost wrote: > * Claudio Freire (klaussfre...@gmail.com) wrote: [...] >> >> The only bottleneck here, is WAL archiving. This assumes you can >> afford

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

2013-06-21 Thread Robert Haas
On Fri, Jun 21, 2013 at 5:44 PM, Tom Lane wrote: > Alvaro Herrera writes: >> Andres Freund escribió: >>> What we could do to improve the robustness a bit - at least on linux - >>> is to prctl(PR_SET_PDEATHSIG, SIGKILL) which would cause children to be >>> killed if the postmaster goes away... > >

Re: [HACKERS] Fixed Cardinality estimation with equality predicates between column of the same table

2013-06-21 Thread Josh Berkus
On 06/21/2013 02:33 PM, desmodemone wrote: > Hi all, > I see a strange behavior ( for me ) on 9.2 (but seems the same on > 9.1 and 9.3) of the optimizer on query like that : > Matteo, I just posted this on -performance. See Tom's answer. -- Josh Berkus PostgreSQL Experts Inc. http:

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

2013-06-21 Thread Troels Nielsen
Hello all I've been examining PostgreSQL to gain a greater understanding of RDBMS. (Thanks for a nice, very educational system!) In the process I've been looking into a few problems and the complications of this patch appeared relatively uninvolved, so I tried to look for a solution. I found the

Re: [HACKERS] Unaccent performance

2013-06-21 Thread Thom Brown
On 21 June 2013 19:04, Thom Brown wrote: > Hi, > > The unaccent extension is great, especially with its customisability, but > it's not always easy to recommend. I witnessed a customer using no less > than 56 nested replace functions in an SQL function. I looked to see how > much this can be mi

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

2013-06-21 Thread Tom Lane
Alvaro Herrera writes: > Andres Freund escribió: >> What we could do to improve the robustness a bit - at least on linux - >> is to prctl(PR_SET_PDEATHSIG, SIGKILL) which would cause children to be >> killed if the postmaster goes away... > This is an interesting idea (even if it has no relations

[HACKERS] Fixed Cardinality estimation with equality predicates between column of the same table

2013-06-21 Thread desmodemone
Hi all, I see a strange behavior ( for me ) on 9.2 (but seems the same on 9.1 and 9.3) of the optimizer on query like that : /* create a table with random data and 2 rows */ create table test1 ( id int not null primary key, state1 int not null default 0, state2 int not null default

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

2013-06-21 Thread Christopher Browne
The case where I wanted "routine" shutdown immediate (and I'm not sure I ever actually got it) was when we were using IBM HA/CMP, where I wanted a "terminate with a fair bit of prejudice". If we know we want to "switch right away now", immediate seemed pretty much right. I was fine with interrupt

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

2013-06-21 Thread Alvaro Herrera
Andres Freund escribió: > On 2013-06-20 22:36:45 -0400, Alvaro Herrera wrote: > > If we leave postmaster running after SIGKILLing its children, the only > > thing we can do is have it continue to SIGKILL processes continuously > > every few seconds until they die (or just sit around doing nothing

Re: [HACKERS] Hardware donation

2013-06-21 Thread Josh Berkus
>> Who can be point of contact from the community to arrange shipping, etc? > > I can be. And I'll handle the tax credit once the servers are received. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make c

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

2013-06-21 Thread Robert Haas
On Fri, Jun 21, 2013 at 2:55 PM, Tom Lane wrote: > Robert Haas writes: >> More generally, what do we think the point is of sending SIGQUIT >> rather than SIGKILL in the first place, and why does that point cease >> to be valid after 5 seconds? > > Well, mostly it's about telling the client we're

Re: Review [was Re: [HACKERS] MD5 aggregate]

2013-06-21 Thread David Fetter
On Fri, Jun 21, 2013 at 10:48:35AM -0700, David Fetter wrote: > On Mon, Jun 17, 2013 at 11:34:52AM +0100, Dean Rasheed wrote: > > On 15 June 2013 10:22, Dean Rasheed wrote: > > > There seem to be 2 separate directions that this could go, which > > > really meet different requirements: > > > > > >

Re: [HACKERS] GIN improvements part2: fast scan

2013-06-21 Thread Heikki Linnakangas
On 19.06.2013 11:56, Alexander Korotkov wrote: On Wed, Jun 19, 2013 at 12:49 PM, Heikki Linnakangas< hlinnakan...@vmware.com> wrote: On 19.06.2013 11:30, Alexander Korotkov wrote: On Wed, Jun 19, 2013 at 11:48 AM, Heikki Linnakangas< hlinnakan...@vmware.com> wrote: On 18.06.2013 23:59,

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

2013-06-21 Thread ian link
Forgive my ignorance, but I don't entirely understand the problem. What does '+' and '-' refer to exactly? Thanks! On Fri, Jun 21, 2013 at 4:35 AM, Hitoshi Harada wrote: > > > > On Fri, Jun 21, 2013 at 3:20 AM, Craig Ringer wrote: > >> On 06/21/2013 05:32 PM, Hitoshi Harada wrote: >> >> > I also

Re: [HACKERS] Hardware donation

2013-06-21 Thread Mark Wong
On Fri, Jun 21, 2013 at 12:03 PM, Jim Nasby wrote: > On 6/21/13 1:45 PM, Josh Berkus wrote: >> >> On 06/21/2013 09:48 AM, Jim Nasby wrote: >>> >>> We've got some recently decommissioned servers and Enova is willing to >>> donate 2 of them to the community. >>> >>> There's nothing terribly spectacu

Re: [HACKERS] Hardware donation

2013-06-21 Thread Jim Nasby
On 6/21/13 1:45 PM, Josh Berkus wrote: On 06/21/2013 09:48 AM, Jim Nasby wrote: We've got some recently decommissioned servers and Enova is willing to donate 2 of them to the community. There's nothing terribly spectacular about the servers except for memory. We have one 512G server available a

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

2013-06-21 Thread Tom Lane
Robert Haas writes: > More generally, what do we think the point is of sending SIGQUIT > rather than SIGKILL in the first place, and why does that point cease > to be valid after 5 seconds? Well, mostly it's about telling the client we're committing hara-kiri. Without that, there's no very good r

Re: [HACKERS] XLogInsert scaling, revisited

2013-06-21 Thread Jeff Janes
On Tue, Jun 18, 2013 at 11:28 PM, Heikki Linnakangas < hlinnakan...@vmware.com> wrote: > On 18.06.2013 21:17, Jeff Janes wrote: > >> Hi Heikki, >> >> I am getting conflicts applying version 22 of this patch to 9.4dev. Could >> you rebase? >> > > Here you go. I think I'm getting an undetected de

Re: [HACKERS] Hardware donation

2013-06-21 Thread Joshua D. Drake
On 06/21/2013 09:48 AM, Jim Nasby wrote: We've got some recently decommissioned servers and Enova is willing to donate 2 of them to the community. There's nothing terribly spectacular about the servers except for memory. We have one 512G server available and the other would be either 192G or 9

Re: [HACKERS] Hardware donation

2013-06-21 Thread Josh Berkus
On 06/21/2013 09:48 AM, Jim Nasby wrote: > We've got some recently decommissioned servers and Enova is willing to > donate 2 of them to the community. > > There's nothing terribly spectacular about the servers except for > memory. We have one 512G server available and the other would be either > 1

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-06-21 Thread Robert Haas
On Thu, Jun 20, 2013 at 12:18 AM, Amit Kapila wrote: > Auto.conf- 1 Vote (Josh) > System.auto.conf - 1 Vote (Josh) > Postgresql.auto.conf - 2 Votes (Zoltan, Amit) > Persistent.auto.conf - 0 Vote > generated_by_server.conf - 1 Vote (Peter E) > System.conf - 1 Vote (Magn

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-06-21 Thread Robert Haas
On Fri, Jun 21, 2013 at 12:56 PM, Fujii Masao wrote: > On Sat, Jun 22, 2013 at 12:11 AM, Robert Haas wrote: >> On Wed, Jun 19, 2013 at 1:59 PM, Peter Eisentraut wrote: >>> On 6/7/13 12:14 AM, Amit Kapila wrote: I will change the patch as per below syntax if there are no objections: >>>

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

2013-06-21 Thread Robert Haas
On Fri, Jun 21, 2013 at 11:33 AM, Jeff Davis wrote: >> Regardless of what syntax we settle on, we should also make sure that >> the conflict is intrinsic to the grammar and can't be factored out, as >> Tom suggested upthread. It's not obvious to me what the actual >> ambiguity is here. If you've

[HACKERS] Unaccent performance

2013-06-21 Thread Thom Brown
Hi, The unaccent extension is great, especially with its customisability, but it's not always easy to recommend. I witnessed a customer using no less than 56 nested replace functions in an SQL function. I looked to see how much this can be mitigated by unaccent. It turns out that not all the ch

Review [was Re: [HACKERS] MD5 aggregate]

2013-06-21 Thread David Fetter
On Mon, Jun 17, 2013 at 11:34:52AM +0100, Dean Rasheed wrote: > On 15 June 2013 10:22, Dean Rasheed wrote: > > There seem to be 2 separate directions that this could go, which > > really meet different requirements: > > > > 1). Produce an unordered sum for SQL to compare 2 tables regardless of > >

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

2013-06-21 Thread Josh Berkus
Cedric, > See this example: > # create table foo (i int, t timestamptz); > # insert into foo select n, now() from generate_series(1,10) g(n); > # select i, first_value(i) over (order by t desc) from foo; > # select i, first_value(i) over (order by t desc ROWS between 0 PRECEDING and > UNBOUNDED F

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

2013-06-21 Thread David Johnston
Cédric Villemain-2 wrote > And also, first_value is a *window* function, not a simple aggregate > function... Per the documentation any aggregate function can be used with a WINDOW declaration. The logical question is why are window aggregates special so that the reverse cannot be true? In othe

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-06-21 Thread Fujii Masao
On Sat, Jun 22, 2013 at 12:11 AM, Robert Haas wrote: > On Wed, Jun 19, 2013 at 1:59 PM, Peter Eisentraut wrote: >> On 6/7/13 12:14 AM, Amit Kapila wrote: >>> I will change the patch as per below syntax if there are no objections: >>> >>> ALTER SYSTEM SET configuration_parameter {TO | =} {value,

Re: [HACKERS] Hardware donation

2013-06-21 Thread Jim Nasby
I stand corrected... we don't have a 512G server available. We do have plenty of 192G and 96G servers though if 2 of those would be of use. Sorry for the noise. On 6/21/13 11:48 AM, Jim Nasby wrote: We've got some recently decommissioned servers and Enova is willing to donate 2 of them to the

Re: [HACKERS] Hardware donation

2013-06-21 Thread Atri Sharma
On Fri, Jun 21, 2013 at 10:18 PM, Jim Nasby wrote: > We've got some recently decommissioned servers and Enova is willing to > donate 2 of them to the community. > > There's nothing terribly spectacular about the servers except for memory. We > have one 512G server available and the other would be

[HACKERS] Hardware donation

2013-06-21 Thread Jim Nasby
We've got some recently decommissioned servers and Enova is willing to donate 2 of them to the community. There's nothing terribly spectacular about the servers except for memory. We have one 512G server available and the other would be either 192G or 96G. I know that folks already have access

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

2013-06-21 Thread Cédric Villemain
Le vendredi 21 juin 2013 03:32:33, Josh Berkus a écrit : > 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_

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

2013-06-21 Thread Jeff Davis
On Fri, 2013-06-21 at 09:21 -0400, Robert Haas wrote: > The other question here is - do we actually have the grammar right? > As in, is this actually the syntax we're supposed to be implementing? > It looks different from what's shown here, where the IGNORE NULLS is > inside the function's parenthe

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

2013-06-21 Thread Robert Haas
On Thu, Jun 20, 2013 at 12:33 PM, Alvaro Herrera wrote: > I will go with 5 seconds, then. I'm uncomfortable with this whole concept, and particularly with such a short timeout. On a very busy system, things can take a LOT longer than they think we should; it can take 30 seconds or more just to g

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

2013-06-21 Thread Robert Haas
On Wed, Jun 19, 2013 at 11:26 PM, Satoshi Nagayasu wrote: > - pageinspect provies several functions for debugging purpose. > - pg_freespace provies a view for monitoring purpose. > - pgstattuple provies several functions for collecting > specific table/index statistics. I think we should be car

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-06-21 Thread Robert Haas
On Wed, Jun 19, 2013 at 1:59 PM, Peter Eisentraut wrote: > On 6/7/13 12:14 AM, Amit Kapila wrote: >> I will change the patch as per below syntax if there are no objections: >> >> ALTER SYSTEM SET configuration_parameter {TO | =} {value, | 'value'}; > > I do like using ALTER SYSTEM in general, but

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Noah Misch
On Fri, Jun 21, 2013 at 04:12:32PM +0200, Andres Freund wrote: > On 2013-06-21 09:51:05 -0400, Noah Misch wrote: > > On Fri, Jun 21, 2013 at 09:20:21AM +, Albe Laurenz wrote: > > Even if you could skip it, queries with expensive > > constant expressions would notice the performance loss. The

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Pavel Stehule
2013/6/21 Andres Freund : > On 2013-06-21 09:51:05 -0400, Noah Misch wrote: >> On Fri, Jun 21, 2013 at 09:20:21AM +, Albe Laurenz wrote: >> > Andres Freund wrote: >> > > Yes, I think it's pretty clearly a bug - Tom doesn't seem think so >> > > though. If we can agree it is, the fix outlined ove

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Andres Freund
On 2013-06-21 09:51:05 -0400, Noah Misch wrote: > That being said, if we discover a simple-enough fix that performs well, we may > as well incorporate it. What about passing another parameter down eval_const_expressions_mutator (which is static, so changing the API isn't a problem) that basically

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Andres Freund
On 2013-06-21 09:51:05 -0400, Noah Misch wrote: > On Fri, Jun 21, 2013 at 09:20:21AM +, Albe Laurenz wrote: > > Andres Freund wrote: > > > Yes, I think it's pretty clearly a bug - Tom doesn't seem think so > > > though. If we can agree it is, the fix outlined over on -bugs seems to > > > be eas

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

2013-06-21 Thread MauMau
From: "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

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Noah Misch
On Fri, Jun 21, 2013 at 09:20:21AM +, Albe Laurenz wrote: > Andres Freund wrote: > > Yes, I think it's pretty clearly a bug - Tom doesn't seem think so > > though. If we can agree it is, the fix outlined over on -bugs seems to > > be easily enough implemented... If you refer to this: On Tue,

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-06-21 Thread Andres Freund
On 2013-06-21 20:54:34 +0900, Michael Paquier wrote: > On Fri, Jun 21, 2013 at 6:19 PM, Andres Freund wrote: > > On 2013-06-19 09:55:24 +0900, Michael Paquier wrote: > >> >> @@ -1529,12 +1570,13 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap, > >> > Is it actually possible to get here with mul

Re: [HACKERS] trgm regex index peculiarity

2013-06-21 Thread Erik Rijkers
On Fri, June 21, 2013 15:11, Alexander Korotkov wrote: > On Fri, Jun 21, 2013 at 2:40 PM, Erik Rijkers wrote: > >> On Fri, June 21, 2013 05:25, Tom Lane wrote: >> > "Erik Rijkers" writes: >> >> In a 112 MB test table (containing random generated text) with a trgm >> index (gin_trgm_ops), I consis

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-06-21 Thread Robert Haas
On Wed, Jun 19, 2013 at 2:42 PM, Fabien COELHO wrote: >> number of transactions actually processed: 301921 > Just a thought before spending too much time on this subtle issue. > > The patch worked reasonnably for 301900 transactions in your above run, and > the few last ones, less than the number

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

2013-06-21 Thread MauMau
From: "Alvaro Herrera" MauMau escribió: 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, would this be any differ

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

2013-06-21 Thread Robert Haas
On Fri, Jun 21, 2013 at 12:18 AM, Jeff Davis wrote: > 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 stand

Re: [HACKERS] trgm regex index peculiarity

2013-06-21 Thread Alexander Korotkov
On Fri, Jun 21, 2013 at 2:40 PM, Erik Rijkers wrote: > On Fri, June 21, 2013 05:25, Tom Lane wrote: > > "Erik Rijkers" 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 wh

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-06-21 Thread Michael Paquier
On Fri, Jun 21, 2013 at 6:19 PM, Andres Freund wrote: > On 2013-06-19 09:55:24 +0900, Michael Paquier wrote: >> >> /* Clean up. */ >> >> heap_freetuple(reltup1); >> >> @@ -1529,12 +1570,13 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap, >> >> if (OidIsValid(newrel->rd

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

2013-06-21 Thread Hitoshi Harada
On Fri, Jun 21, 2013 at 3:20 AM, Craig Ringer wrote: > On 06/21/2013 05:32 PM, Hitoshi Harada wrote: > > > I also later found that we are missing not only notion of '+' or '-', > > but also notion of 'zero value' in our catalog. Per spec, RANGE BETWEEN > > needs to detect ERROR if the offset val

Re: [HACKERS] Patch for removng unused targets

2013-06-21 Thread Etsuro Fujita
> From: Hitoshi Harada [mailto:umi.tan...@gmail.com] > I tried several ways but I couldn't find big problems. Small typo: > s/rejunk/resjunk/ Thank you for the review. Attached is an updated version of the patch. Thanks, Best regards, Etsuro Fujita unused-targets-20130621.pat

Re: [HACKERS] trgm regex index peculiarity

2013-06-21 Thread Erik Rijkers
On Fri, June 21, 2013 05:25, Tom Lane wrote: > "Erik Rijkers" 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 >> w

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

2013-06-21 Thread Craig Ringer
On 06/21/2013 05:32 PM, Hitoshi Harada wrote: > I also later found that we are missing not only notion of '+' or '-', > but also notion of 'zero value' in our catalog. Per spec, RANGE BETWEEN > needs to detect ERROR if the offset value is negative, but it is not > always easy if you think about i

Re: [HACKERS] Patch for removng unused targets

2013-06-21 Thread Hitoshi Harada
On Thu, Jun 20, 2013 at 12:19 AM, Etsuro Fujita wrote: > > From: Hitoshi Harada [mailto:umi.tan...@gmail.com] > > > I guess the patch works fine, but what I'm saying is it might be limited > to > > small use cases. Another instance of this that I can think of is ORDER > BY > clause > > of window

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Pavel Stehule
2013/6/21 Andres Freund : > Hi, > > > On 2013-06-21 08:16:22 +, Albe Laurenz wrote: >> I want to draw attention to this thread on -general: >> camq5dgq4sujpbht2-9xlapasvknul2-bb0cpyci2fp+pfsf...@mail.gmail.com > > There's also a bug reported for it: > #8237: e1uovmc-0007ft...@wrigleys.postgresq

Re: [HACKERS] [PATCH] Add session_preload_libraries configuration parameter

2013-06-21 Thread Dimitri Fontaine
Hi, Peter Eisentraut writes: > This is like shared_preload_libraries except that it takes effect at > backend start and can be changed without a full postmaster restart. It > is like local_preload_libraries except that it is still only settable by > a superuser. This can be a better way to load

Re: [HACKERS] refresh materialized view concurrently

2013-06-21 Thread Andres Freund
On 2013-06-21 02:43:23 -0700, Hitoshi Harada wrote: > On Fri, Jun 21, 2013 at 2:20 AM, Hitoshi Harada wrote: > > > > > > > > > On Fri, Jun 14, 2013 at 9:05 AM, Kevin Grittner wrote: > > > >> Attached is a patch for REFRESH MATERIALIZED VIEW CONCURRENTLY for > >> 9.4 CF1. The goal of this patch i

Re: [HACKERS] refresh materialized view concurrently

2013-06-21 Thread Hitoshi Harada
On Fri, Jun 21, 2013 at 2:20 AM, Hitoshi Harada wrote: > > > > On Fri, Jun 14, 2013 at 9:05 AM, Kevin Grittner wrote: > >> Attached is a patch for REFRESH MATERIALIZED VIEW CONCURRENTLY for >> 9.4 CF1. The goal of this patch is to allow a refresh without >> interfering with concurrent reads, usi

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

2013-06-21 Thread Andres Freund
On 2013-06-20 22:36:45 -0400, Alvaro Herrera wrote: > 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

Re: [HACKERS] Config reload/restart preview

2013-06-21 Thread Thom Brown
On 21 June 2013 05:47, Gurjeet Singh wrote: > On Thu, Jun 20, 2013 at 9:33 AM, Magnus Hagander wrote: > >> On Thu, Jun 20, 2013 at 2:54 PM, Dimitri Fontaine >> wrote: >> > Magnus Hagander writes: >> >>> Should we have a way of previewing changes that would be applied if we >> >>> reloaded/resta

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

2013-06-21 Thread Hitoshi Harada
On Thu, Jun 20, 2013 at 7:24 PM, Craig Ringer wrote: > > I've missed this feature more than once, and am curious about whether > any more recent changes may have made it cleaner to tackle this, or > whether consensus can be formed on adding the new entries to btree's > opclass to avoid the undesira

Re: [HACKERS] refresh materialized view concurrently

2013-06-21 Thread Hitoshi Harada
On Fri, Jun 14, 2013 at 9:05 AM, Kevin Grittner wrote: > Attached is a patch for REFRESH MATERIALIZED VIEW CONCURRENTLY for > 9.4 CF1. The goal of this patch is to allow a refresh without > interfering with concurrent reads, using transactional semantics. > I spent a few hours to review the pat

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Albe Laurenz
Andres Freund wrote: > On 2013-06-21 08:16:22 +, Albe Laurenz wrote: > > I want to draw attention to this thread on -general: > > camq5dgq4sujpbht2-9xlapasvknul2-bb0cpyci2fp+pfsf...@mail.gmail.com > > There's also a bug reported for it: > #8237: e1uovmc-0007ft...@wrigleys.postgresql.org > > >

Re: [HACKERS] updated emacs configuration

2013-06-21 Thread Dimitri Fontaine
Hi, Peter Eisentraut writes: > I think the suggested emacs configuration snippets in > src/tools/editors/emacs.samples no longer represent current best > practices. I have come up with some newer things that I'd like to > propose for review. Thanks for doing that! > First, I propose adding a .

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-06-21 Thread Andres Freund
On 2013-06-19 09:55:24 +0900, Michael Paquier wrote: > Please find an updated patch. The regression test rules has been > updated, and all the comments are addressed. > > On Tue, Jun 18, 2013 at 6:35 PM, Andres Freund wrote: > > Hi, > > > > On 2013-06-18 10:53:25 +0900, Michael Paquier wrote: > >

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

2013-06-21 Thread Dean Rasheed
On 21 June 2013 06:16, David Fetter wrote: > 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

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

2013-06-21 Thread Dean Rasheed
On 21 June 2013 05:01, David Fetter wrote: > What tests do you think should be there that aren't? > I think I expected to see more tests related to some of the specific code changes, such as CREATE TABLE t AS SELECT * FROM generate_series(1,10) t(x); -- Should fail (filter can't be used for non

Re: [HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Andres Freund
Hi, On 2013-06-21 08:16:22 +, Albe Laurenz wrote: > I want to draw attention to this thread on -general: > camq5dgq4sujpbht2-9xlapasvknul2-bb0cpyci2fp+pfsf...@mail.gmail.com There's also a bug reported for it: #8237: e1uovmc-0007ft...@wrigleys.postgresql.org > Would you concur that this is

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

2013-06-21 Thread Dmitriy Igrishin
2013/6/21 Albe Laurenz > Dmitriy Igrishin wrote: > > Sent: Thursday, June 20, 2013 5:09 PM > > To: PostgreSQL Hackers > > Subject: [HACKERS] Frontend/backend protocol improvements proposal > (request). > > > > Hackers, > > > > While developing a C++ client library for Postgres I felt lack of extr

Re: [HACKERS] Improvement of checkpoint IO scheduler for stable transaction responses

2013-06-21 Thread KONDO Mitsumasa
Hi, I took results of my separate patches and original PG. * Result of DBT-2 | TPS 90%tileAverage Maximum -- original_0.7 | 3474.62 18.348328 5.73936.977713 original_1.0 | 3469.03 18.637865 5.84241.754421 f

[HACKERS] Possible bug in CASE evaluation

2013-06-21 Thread Albe Laurenz
I want to draw attention to this thread on -general: camq5dgq4sujpbht2-9xlapasvknul2-bb0cpyci2fp+pfsf...@mail.gmail.com Would you concur that this is a bug? The fine manual says about CASE: If the condition's result is true, the value of the CASE expression is the result that follows the con

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

2013-06-21 Thread Albe Laurenz
Dmitriy Igrishin wrote: > Sent: Thursday, June 20, 2013 5:09 PM > To: PostgreSQL Hackers > Subject: [HACKERS] Frontend/backend protocol improvements proposal (request). > > Hackers, > > While developing a C++ client library for Postgres I felt lack of extra > information in command tags in the Co

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-06-21 Thread Dean Rasheed
On 21 June 2013 08:02, Dean Rasheed wrote: > On 21 June 2013 06:54, David Fetter wrote: >>> For example "SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS file" >> >> The spec is pretty specific about the "all or none" nature of naming >> in the AS clause...unless we can figure out a way of getting

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

2013-06-21 Thread Hitoshi Harada
On Thu, Jun 20, 2013 at 3:40 PM, MauMau wrote: > > 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 process might still rema

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-06-21 Thread Dean Rasheed
On 21 June 2013 06:54, David Fetter wrote: >> For example "SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS file" > > The spec is pretty specific about the "all or none" nature of naming > in the AS clause...unless we can figure out a way of getting around it > somehow. We already support and docu