Re: [HACKERS] WAL replay bugs

2014-04-18 Thread Peter Geoghegan
On Thu, Apr 17, 2014 at 10:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Any objections to changing those two? Not here. I've always suspected #2 was going to bite us someday anyway. +1 -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Patch: iff - if

2014-04-18 Thread Albe Laurenz
Nicolas Barbier wrote: 2014-04-17 Michael Paquier michael.paqu...@gmail.com: Is there no equivalent in German? For example in French there is ssi. gdw (genau dann, wenn) Sorry, but I as a German native speaker and mathematitian have never encountered this abbreviation. I am familiar with

Re: [HACKERS] [GENERAL] client encoding that psql command sets

2014-04-18 Thread Albe Laurenz
Bruce Momjian wrote: I suggest the attached documentation fix. Patch applied and backpatched to 9.3. Thanks. What would PostgreSQL do without Bruce who undertakes the Herculean task of making sure that nothing gets forgotten and slips through the cracks? Thanks! Yours, Laurenz Albe --

Re: [HACKERS] New windows compiler warning from 585bca39

2014-04-18 Thread Bruce Momjian
On Thu, Apr 17, 2014 at 04:14:55PM -0400, Tom Lane wrote: Perhaps the #ifndef could be placed in a nicer spot in the patch, but the attached should at least describe where the problem lies... Yeah, I thought it better to make a separate declaration to wrap in #ifndef. pgindent is probably

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-04-18 Thread Kyotaro HORIGUCHI
Hello, I don't think we should consider changing long-established behavior in the back-branches. The old behavior may not be ideal, but that doesn't mean it's a bug. Ok, I understand that. I give it up. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via

[HACKERS] Minor improvement in src/backend/access/gin/README

2014-04-18 Thread Etsuro Fujita
The attached improves a document in src/backend/access/gin/README. Thanks, Best regards, Etsuro Fujita diff --git a/src/backend/access/gin/README b/src/backend/access/gin/README index 3f0c3e2..8a71d28 100644 --- a/src/backend/access/gin/README +++ b/src/backend/access/gin/README @@ -181,7 +181,7

[HACKERS] Minor improvement in gin_private.h

2014-04-18 Thread Etsuro Fujita
The attached improves a comment in gin_private.h a little bit. Thanks, Best regards, Etsuro Fujita diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index 81a3bee..3aa4276 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@

Re: [HACKERS] Get more from indices.

2014-04-18 Thread Kyotaro HORIGUCHI
Hello, I thought some more about this patch, and realized that it's more or less morally equivalent to allowing references to ungrouped variables when the query has a GROUP BY clause listing all the columns of the primary key. In that case the parser is effectively pretending that the GROUP

[HACKERS] Typo fix in src/backend/access/transam/recovery.conf.sample

2014-04-18 Thread Amit Langote
Hi, Attached fixes a minor typo in src/backend/access/transam/recovery.conf.sample. -- Amit recovery-conf-sample-typo-fix.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Typo fix in src/backend/access/transam/recovery.conf.sample

2014-04-18 Thread Magnus Hagander
On Fri, Apr 18, 2014 at 12:24 PM, Amit Langote amitlangot...@gmail.comwrote: Hi, Attached fixes a minor typo in src/backend/access/transam/recovery.conf.sample. Applied, except I also rewrapped the line to make it shorter. Thanks! -- Magnus Hagander Me: http://www.hagander.net/ Work:

Re: [HACKERS] Typo fix in src/backend/access/transam/recovery.conf.sample

2014-04-18 Thread Amit Langote
On Fri, Apr 18, 2014 at 7:50 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Apr 18, 2014 at 12:24 PM, Amit Langote amitlangot...@gmail.com wrote: Hi, Attached fixes a minor typo in src/backend/access/transam/recovery.conf.sample. Applied, except I also rewrapped the line to make

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Atri Sharma
On Fri, Apr 18, 2014 at 7:27 AM, Peter Geoghegan p...@heroku.com wrote: A way I have in mind about eviction policy is to introduce a way to have an ageing factor in each buffer and take the ageing factor into consideration when evicting a buffer. Consider a case where a table is pretty huge and

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-18 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com Currently -e option is accepted with all the options that can be provided in pg_ctl. Shouldn't we accept it only with options related to service, because that is only when it will be used. Basically write_stderr() will write to event log only incase of

Re: [HACKERS] How can we make beta testing better?

2014-04-18 Thread MauMau
From: Josh Berkus j...@agliodbs.com How can we make beta testing better and more effective? How can we get more users to actually throw serious workloads at new versions and share the results? I've tried a couple of things over the last two years and they haven't worked all that well. Since

Re: [HACKERS] Get more from indices.

2014-04-18 Thread Tom Lane
Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp writes: Ok, I am convinced that your suggestion - truncating query_pathkeys by removing eventually no-op entries - seems preferable and will have wider effect naturally - more promised. I won't persist with the way this patch currently does

Re: [HACKERS] assertion in 9.4 with wal_level=logical

2014-04-18 Thread Robert Haas
On Thu, Apr 17, 2014 at 10:47 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-17 17:40:01 -0300, Alvaro Herrera wrote: For once, this looks more like a problem in logical decoding, which is trying to assert about the tuple being updated; the assertion failing is the one added a week

Re: [HACKERS] assertion in 9.4 with wal_level=logical

2014-04-18 Thread Alvaro Herrera
Robert Haas wrote: On Thu, Apr 17, 2014 at 10:47 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-17 17:40:01 -0300, Alvaro Herrera wrote: For once, this looks more like a problem in logical decoding, which is trying to assert about the tuple being updated; the assertion failing

Re: [HACKERS] assertion in 9.4 with wal_level=logical

2014-04-18 Thread Andres Freund
On 2014-04-18 16:44:55 +0200, Robert Haas wrote: On Thu, Apr 17, 2014 at 10:47 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-17 17:40:01 -0300, Alvaro Herrera wrote: For once, this looks more like a problem in logical decoding, which is trying to assert about the tuple being

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Peter Eisentraut
On 4/17/14, 8:24 PM, Tom Lane wrote: We could in fact implement #2, I imagine, by destroying and recreating the entire language interpreter. So I could imagine implementing a DISCARD INTERPRETERS kind of command that would zap the current interpreter(s) for whichever PL languages happened to

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Peter Eisentraut
On 4/17/14, 4:44 PM, Joshua D. Drake wrote: That we should also release the GD? In some cases, SD or GD are used to cache things. Having the connection pooler blow that away would defeat the point. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] assertion in 9.4 with wal_level=logical

2014-04-18 Thread Alvaro Herrera
Andres Freund wrote: On 2014-04-18 11:50:55 -0300, Alvaro Herrera wrote: It's a bit painful that HeapTupleHeaderGetUpdateXid allocates memory, but to fix that we would have to remove all allocations from GetMultiXactIdMembers which doesn't sound feasible. I was thinking for a second we

Re: [HACKERS] assertion in 9.4 with wal_level=logical

2014-04-18 Thread Andres Freund
On 2014-04-18 11:50:55 -0300, Alvaro Herrera wrote: It's a bit painful that HeapTupleHeaderGetUpdateXid allocates memory, but to fix that we would have to remove all allocations from GetMultiXactIdMembers which doesn't sound feasible. I was thinking for a second we could just allocate

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 4/17/14, 8:24 PM, Tom Lane wrote: We could in fact implement #2, I imagine, by destroying and recreating the entire language interpreter. So I could imagine implementing a DISCARD INTERPRETERS kind of command that would zap the current

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Robert Haas
On Thu, Apr 17, 2014 at 5:00 PM, Greg Stark st...@mit.edu wrote: On Thu, Apr 17, 2014 at 10:18 AM, Robert Haas robertmh...@gmail.com wrote: Because all the usage counts are the same, the eviction at this point is completely indiscriminate. We're just as likely to kick out a btree root page or

Re: [HACKERS] How can we make beta testing better?

2014-04-18 Thread Alvaro Herrera
MauMau wrote: From: Josh Berkus j...@agliodbs.com How can we make beta testing better and more effective? How can we get more users to actually throw serious workloads at new versions and share the results? I've tried a couple of things over the last two years and they haven't worked all

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Greg Stark
On Fri, Apr 18, 2014 at 4:14 PM, Robert Haas robertmh...@gmail.com wrote: I am a bit confused by this remark. In *any* circumstance when you evict you're incurring precisely one page fault I/O when the page is read back in. That doesn't mean that the choice of which page to evict is

Re: [HACKERS] assertion failure 9.3.4

2014-04-18 Thread Andrew Dunstan
On 04/17/2014 10:15 AM, Andrew Dunstan wrote: On 04/16/2014 10:28 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 04/16/2014 07:19 PM, Tom Lane wrote: Yeah, it would be real nice to see a self-contained test case for this. Well, that might be hard to put together, but I

Re: [HACKERS] How can we make beta testing better?

2014-04-18 Thread Greg Stark
On Fri, Apr 18, 2014 at 4:15 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: There was no reply, which I took as this isn't a new feature and isn't user visible anyway, so what would be the point? To be fair the list was pretty long already. And like regression testing, coming up with a

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Joshua D. Drake
On 04/18/2014 08:01 AM, Peter Eisentraut wrote: On 4/17/14, 4:44 PM, Joshua D. Drake wrote: That we should also release the GD? In some cases, SD or GD are used to cache things. Having the connection pooler blow that away would defeat the point. Not on a per session basis. Although I can

Re: [HACKERS] How can we make beta testing better?

2014-04-18 Thread Josh Berkus
On 04/18/2014 08:15 AM, Alvaro Herrera wrote: and see whether it still works at all for you. I asked Josh specifically to mention it in a followup to this message which you can see in that thread. There was no reply, which I took as this isn't a new feature and isn't user visible anyway, so

Re: [HACKERS] assertion failure 9.3.4

2014-04-18 Thread Josh Berkus
On 04/18/2014 09:42 AM, Andrew Dunstan wrote: There definitely seems to be something going on involving these two pre-loaded modules. With both auto_explain and pg_stat_statements preloaded I can reproduce the error fairly reliably. I have also reproduced it, but less reliably, with

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Bruce Momjian
On Fri, Apr 18, 2014 at 04:46:31PM +0530, Atri Sharma wrote: This can be changed by introducing an ageing factor that sees how much time the current buffer has spend in shared buffers. If the time that the buffer has spent is large enough (relatively) and it is not hot currently, that means

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Atri Sharma
On Sat, Apr 19, 2014 at 1:07 AM, Bruce Momjian br...@momjian.us wrote: On Fri, Apr 18, 2014 at 04:46:31PM +0530, Atri Sharma wrote: This can be changed by introducing an ageing factor that sees how much time the current buffer has spend in shared buffers. If the time that the buffer has

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Jason Petersen
On Apr 18, 2014, at 1:51 PM, Atri Sharma atri.j...@gmail.com wrote: Counting clock sweeps is an intersting idea. I think one concern was tracking hot buffers in cases where there is no memory pressure, and hence the clock sweep isn't running --- I am not sure how this would help in that

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Atri Sharma
Yes, we obviously want a virtual clock. Focusing on the use of gettimeofday seems silly to me: it was something quick for the prototype. The problem with the clocksweeps is they don’t actually track the progression of “time” within the PostgreSQL system. What’s wrong with using a transaction

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Peter Geoghegan
On Fri, Apr 18, 2014 at 1:11 PM, Jason Petersen ja...@citusdata.com wrote: Yes, we obviously want a virtual clock. Focusing on the use of gettimeofday seems silly to me: it was something quick for the prototype. The gettimeofday() call doesn't need to happen in a tight loop. It can be

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-18 Thread Bruce Momjian
On Sat, Apr 19, 2014 at 01:21:29AM +0530, Atri Sharma wrote: I feel that if there is no memory pressure, frankly it doesnt matter much about what gets out and what not. The case I am specifically targeting is when the clocksweep gets to move about a lot i.e. high memory pressure workloads. Of

Re: [HACKERS] Composite Datums containing toasted fields are a bad idea(?)

2014-04-18 Thread Tom Lane
Noah Misch n...@leadboat.com writes: Interesting bug. On Fri, Mar 28, 2014 at 04:34:41PM -0400, Tom Lane wrote: I think we might be better off to get rid of toast_flatten_tuple_attribute and instead insist that composite Datums never contain any external toast pointers in the first place.