Re: [HACKERS] WIP: Join push-down for foreign tables

2011-09-21 Thread Shigeru Hanada
Hi Michael, (2011/09/21 12:52), Michael Paquier wrote: I am interested in the development you are doing regarding join push down and fdw stuff for remote postgreSQL servers. Is there a way to get the postgres fdw you are providing here for common 9.1? I saw that the tar you are providing

Re: [HACKERS] Online base backup from the hot-standby

2011-09-21 Thread Fujii Masao
On Wed, Sep 21, 2011 at 2:13 PM, Magnus Hagander mag...@hagander.net wrote: On Wed, Sep 21, 2011 at 04:50, Fujii Masao masao.fu...@gmail.com wrote: 3. Copy the pg_control file from the cluster directory on the standby to    the backup as follows:    cp $PGDATA/global/pg_control

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Heikki Linnakangas
On 21.09.2011 02:53, Peter Geoghegan wrote: C stdlib quick-sort time elapsed: 2.092451 seconds Inline quick-sort time elapsed: 1.587651 seconds Does *that* look attractive to you? Not really, to be honest. That's a 25% speedup in pure qsorting speed. How much of a gain in a real query do you

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Simon Riggs
On Tue, Sep 20, 2011 at 3:51 AM, Tom Lane t...@sss.pgh.pa.us wrote: This performance patch differs from most in that it's difficult in principle to imagine a performance regression occurring. Really?  N copies of the same code could lead to performance loss just due to code bloat (ie, less

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Simon Riggs
On Wed, Sep 21, 2011 at 7:51 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 21.09.2011 02:53, Peter Geoghegan wrote: C stdlib quick-sort time elapsed: 2.092451 seconds Inline quick-sort time elapsed: 1.587651 seconds Does *that* look attractive to you? Not really, to

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Heikki Linnakangas
On 21.09.2011 10:01, Simon Riggs wrote: On Wed, Sep 21, 2011 at 7:51 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 21.09.2011 02:53, Peter Geoghegan wrote: C stdlib quick-sort time elapsed: 2.092451 seconds Inline quick-sort time elapsed: 1.587651 seconds Does *that*

Re: [HACKERS] WIP: Join push-down for foreign tables

2011-09-21 Thread Michael Paquier
2011/9/21 Shigeru Hanada shigeru.han...@gmail.com Hi Michael, (2011/09/21 12:52), Michael Paquier wrote: I am interested in the development you are doing regarding join push down and fdw stuff for remote postgreSQL servers. Is there a way to get the postgres fdw you are providing here

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Jeff Davis
On Mon, 2011-09-19 at 18:32 +0200, Florian Pflug wrote: No, but more similar the format are the easier it gets to at least factor the hairy parts of such a parser into a common subroutine. Assume that we don't support NULL as an alias for INF. What would then be the result of

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Jeff Davis
On Mon, 2011-09-19 at 12:26 -0400, Robert Haas wrote: What I really care about is that we don't talk ourselves into needing a zillion constructor functions. Making things work with a single constructor function seems to me to simplify life quite a bit, and allowing there seems essential for

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Peter Geoghegan
On 21 September 2011 01:48, karave...@mail.bg wrote: All -O2 version show 42% speedup with inlined qsort. -O0 showed 25% speedup. Thanks. Looks like the figures I posted last night were fairly conservative. Does anyone else care to report results? -- Peter Geoghegan      

[HACKERS] Shared sequence-like objects in PostgreSQL

2011-09-21 Thread Vlad Arkhipov
Hello all, I'm writing a C-language function that is similar to nextval() but should return the next member of the recurrent sequence: T(n+1) = f(T(n), T(n-1), ..., T(n-k)), where f is some function and k is a constant. The state of this object should be persistent between database restarts

Re: [HACKERS] Online base backup from the hot-standby

2011-09-21 Thread Magnus Hagander
On Wed, Sep 21, 2011 at 08:23, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Sep 21, 2011 at 2:13 PM, Magnus Hagander mag...@hagander.net wrote: On Wed, Sep 21, 2011 at 04:50, Fujii Masao masao.fu...@gmail.com wrote: 3. Copy the pg_control file from the cluster directory on the standby to  

Re: [HACKERS] Improve lseek scalability v3

2011-09-21 Thread Marco Stornelli
2011/9/19 Matthew Wilcox matt...@wil.cx: On Mon, Sep 19, 2011 at 08:31:00AM -0400, Stephen Frost wrote: * Benjamin LaHaise (b...@kvack.org) wrote: For such tables, can't Postgres track the size of the file internally?  I'm assuming it's keeping file descriptors open on the tables it manages,

[HACKERS] [PATCH] POC: inline int4 comparison in tuplesort

2011-09-21 Thread Dan McGee
This attempts to be as simple as it gets while reducing function call depth, and should be viewed as a proof of concept. It is also untested as of now, but will try to do that and report back. I'm hoping I followed the rabbit hole correctly and are correctly comparing the right pointers to each

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Amit Kapila
Recent discussions on the threads Double sorting split patch and CUDA sorting raised the possibility that there could be significant performance optimisation low-hanging fruit picked by having the executor treat integers and floats as a special case during sorting, avoiding going to the

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Florian Pflug
On Sep21, 2011, at 09:23 , Jeff Davis wrote: On Mon, 2011-09-19 at 18:32 +0200, Florian Pflug wrote: No, but more similar the format are the easier it gets to at least factor the hairy parts of such a parser into a common subroutine. Assume that we don't support NULL as an alias for INF. What

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 3:29 AM, Jeff Davis pg...@j-davis.com wrote: On Mon, 2011-09-19 at 12:26 -0400, Robert Haas wrote: What I really care about is that we don't talk ourselves into needing a zillion constructor functions.  Making things work with a single constructor function seems to me

Re: [HACKERS] Shared sequence-like objects in PostgreSQL

2011-09-21 Thread Greg Stark
On Wed, Sep 21, 2011 at 8:19 AM, Vlad Arkhipov arhi...@dc.baikal.ru wrote: I'm writing a C-language function that is similar to nextval() but should return the next member of the recurrent sequence: T(n+1) = f(T(n), T(n-1), ..., T(n-k)), where f is some function and k is a constant. The state

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Florian Pflug
On Sep21, 2011, at 14:00 , Robert Haas wrote: On Wed, Sep 21, 2011 at 3:29 AM, Jeff Davis pg...@j-davis.com wrote: On Mon, 2011-09-19 at 12:26 -0400, Robert Haas wrote: (I am also vaguely wondering what happens if if you have a text range is (nubile, null) ambiguous?) There are a few

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 8:41 AM, Florian Pflug f...@phlo.org wrote: Boy, that seems really weird to me.  If you're going to do it, it ought to be case-insensitive, but I think detecting the case only for the purpose of rejecting it is probably a mistake.  I mean, if (nubile, nutty) is OK, then

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Greg Stark
On Wed, Sep 21, 2011 at 8:08 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: How about almost every primary index creation? Nope. Swamped by everything else. Really? I think it's pretty common for shops to be able to dedicate large amounts of RAM to building initial indexes

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 8:47 AM, Greg Stark st...@mit.edu wrote: On Wed, Sep 21, 2011 at 8:08 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: How about almost every primary index creation? Nope. Swamped by everything else. Really? I think it's pretty common for shops to be

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Peter Geoghegan
On 21 September 2011 07:51, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 21.09.2011 02:53, Peter Geoghegan wrote: C stdlib quick-sort time elapsed: 2.092451 seconds Inline quick-sort time elapsed: 1.587651 seconds Does *that* look attractive to you? Not really, to be

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Heikki Linnakangas
On 21.09.2011 17:20, Peter Geoghegan wrote: Even still, I think that the 12.5% figure is pretty pessimistic - I've already sped up the dell store query by almost that much, and that's with a patch that was, due to circumstances, cobbled together. I'm not against making things faster, it's just

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Tom Lane
Florian Pflug f...@phlo.org writes: On Sep21, 2011, at 14:00 , Robert Haas wrote: Otherwise, anyone who wants to construct these strings programatically is going to need to escape everything and always write (cat,dog) or however you do that, and that seems like an unnecessary imposition.

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 21.09.2011 17:20, Peter Geoghegan wrote: Even still, I think that the 12.5% figure is pretty pessimistic - I've already sped up the dell store query by almost that much, and that's with a patch that was, due to circumstances,

[HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-09-21 Thread Linas Virbalas
Hello, * Context * I'm observing problems with provisioning a standby from the master by following a basic and documented Making a Base Backup [1] procedure with rsync if, in the mean time, heavy load is applied on the master. After searching the archives, the only more discussed and similar

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Andrew Dunstan
On 09/21/2011 10:50 AM, Tom Lane wrote: The other question that I'm going to be asking is whether it's not possible to get most of the same improvement with a much smaller code footprint. I continue to suspect that getting rid of the SQL function impedance-match layer (myFunctionCall2Coll

[HACKERS] sequence locking

2011-09-21 Thread Andres Freund
Hi, I find the current behaviour of locking of sequences rather problematic. Multiple things: - First and foremost I find it highly dangerous that ALTER SEQUENCE ... is for the biggest part not transactional. I think about the only transaction part is the name, owner and schema. Sure, its

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Florian Pflug
On Sep21, 2011, at 16:41 , Tom Lane wrote: Florian Pflug f...@phlo.org writes: On Sep21, 2011, at 14:00 , Robert Haas wrote: Otherwise, anyone who wants to construct these strings programatically is going to need to escape everything and always write (cat,dog) or however you do that, and

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: This is a marvellous win, a huge gain from a small, isolated and easily tested change. By far the smallest amount of additional code to sorting we will have added and yet one of the best gains. I think you forgot your cheerleader uniform. A patch

Re: [HACKERS] Is there really no interest in SQL Standard?

2011-09-21 Thread Susanne Ebrecht
Hello Alvaro, On 16.09.2011 15:08, Alvaro Herrera wrote: It's certainly possible to create a private mailing list to support this idea. How would the membership be approved, however, is not clear to me. Would we let only well-known names from other pgsql lists into it? (I, for one, had no

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Peter Geoghegan
On 21 September 2011 15:50, Tom Lane t...@sss.pgh.pa.us wrote: Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: I'm not against making things faster, it's just that I haven't seen solid evidence yet that this will help. Just provide a best-case test case for this that shows a

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 09/21/2011 10:50 AM, Tom Lane wrote: The other question that I'm going to be asking is whether it's not possible to get most of the same improvement with a much smaller code footprint. I continue to suspect that getting rid of the SQL function

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Heikki Linnakangas
On 21.09.2011 18:46, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: On 09/21/2011 10:50 AM, Tom Lane wrote: The other question that I'm going to be asking is whether it's not possible to get most of the same improvement with a much smaller code footprint. I continue to suspect

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Greg Stark
On Wed, Sep 21, 2011 at 4:46 PM, Tom Lane t...@sss.pgh.pa.us wrote:  As such, they could not have entries in pg_proc, so it seems like there's no ready way to represent them in the catalogs. Why couldn't they be in pg_proc with a bunch of opaque arguments like the GIST opclass support

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 21.09.2011 18:46, Tom Lane wrote: The idea that I was toying with was to allow the regular SQL-callable comparison function to somehow return a function pointer to the alternate comparison function, You could have a new

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Heikki Linnakangas
On 21.09.2011 18:46, Tom Lane wrote: Well, we'd have to negotiate what the API ought to be. What I'm envisioning is that datatypes could provide alternate comparison functions that are designed to be qsort-callable rather than SQL-callable. As such, they could not have entries in pg_proc, so

[HACKERS] DECLARE CURSOR must not contain data-modifying statements in WITH

2011-09-21 Thread Andres Freund
Hi all, Whats the reason for disallowing cursors on wCTEs? I am not sure I can follow the comment: /* * We also disallow data-modifying WITH in a cursor. (This could be * allowed, but the semantics of when the updates occur might be * surprising.) */

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Wed, Sep 21, 2011 at 4:46 PM, Tom Lane t...@sss.pgh.pa.us wrote:  As such, they could not have entries in pg_proc, so it seems like there's no ready way to represent them in the catalogs. Why couldn't they be in pg_proc with a bunch of opaque arguments like

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-09-21 Thread Euler Taveira de Oliveira
On 21-09-2011 11:44, Linas Virbalas wrote: [This question doesn't belong to -hackers. Please post it in -general or -admin] Procedure: 1. Start load generator on the master (WAL archiving enabled). 2. Prepare a Streaming Replication standby (accepting WAL files too): 2.1. pg_switch_xlog() on

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 21.09.2011 18:46, Tom Lane wrote: Well, we'd have to negotiate what the API ought to be. What I'm envisioning is that datatypes could provide alternate comparison functions that are designed to be qsort-callable rather than

[HACKERS] unaccent contrib

2011-09-21 Thread Daniel Vázquez
Hi guys! I know Postgresql 9.x includes unaccent contrib on their deliver package. unaccent is compatible with postgresql 8.4 (but not is in their contrib version distribution) what's better way to setup unaccent module on Postgresql 8.4 production server. Copy contrib/unaccent from 9.x to the

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-09-21 Thread Florian Pflug
On Sep21, 2011, at 16:44 , Linas Virbalas wrote: After searching the archives, the only more discussed and similar issue I found hit was by Daniel Farina in a thread hot backups: am I doing it wrong, or do we have a problem with pg_clog? [2], but, it seems, the issue was discarded because of a

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Greg Stark
On Wed, Sep 21, 2011 at 5:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: None of that stuff is inlinable or constant-foldable today, nor would it be with the patch that Peter was proposing AFAICS, because none of the flags will ever be compile time constant values. I was referring to

Re: [HACKERS] Is there really no interest in SQL Standard?

2011-09-21 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of mié sep 21 00:27:53 -0300 2011: On tis, 2011-09-20 at 11:12 -0300, Alvaro Herrera wrote: +1 for a closed mailing list. It's a bit annoying to have to do such a thing, but it's not like we haven't got other closed lists for appropriate

Re: [HACKERS] Is there really no interest in SQL Standard?

2011-09-21 Thread Dave Page
On Wed, Sep 21, 2011 at 5:49 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Peter Eisentraut's message of mié sep 21 00:27:53 -0300 2011: On tis, 2011-09-20 at 11:12 -0300, Alvaro Herrera wrote: +1 for a closed mailing list.  It's a bit annoying to have to do such a

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It seems to have been allowed in prehistoric times. It would be nice to allow it. I've had to create a dummy

[HACKERS] Remastering using streaming only replication?

2011-09-21 Thread Josh Berkus
Fujii, I haven't really been following your latest patches about taking backups from the standby and cascading replication, but I wanted to see if it fulfills another TODO: the ability to remaster (that is, designate the lead standby as the new master) without needing to copy WAL files.

Re: [HACKERS] sequence locking

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It seems to have been allowed

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Josh Berkus
Robert, Josh is arguing that we ought to use the term replication, but it Actually, no. I'm arguing that we should use the term standby, since that term is consistent with how we refer to replica servers throughout the docs, and the term recovery is not. seems to me that's just as misleading

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 12:55 PM, Josh Berkus j...@agliodbs.com wrote: Josh is arguing that we ought to use the term replication, but it Actually, no. I'm arguing that we should use the term standby, since that term is consistent with how we refer to replica servers throughout the docs, and

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Jeff Davis
On Wed, 2011-09-21 at 17:20 +0200, Florian Pflug wrote: Hm, so we'd have '(X,)' for range(X, NULL, '()'), '(,X)' for range(NULL, X, '()') and '(,)' for range(NULL, NULL, '()'). We'd then have the choice of either declaring '(X,]' to mean '(X,)', '[,X)' to mean '(,X)' and

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Jeff Davis
On Wed, 2011-09-21 at 13:24 +0200, Florian Pflug wrote: I've thought about this some more, and came to realize that the question here really is whether floatrange(0, 'Infinity'::float, '[)') and floatrange(0, NULL, '[)') are the same thing or not. The unbounded side of a range

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Merlin Moncure mmonc...@gmail.com wrote: On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Josh Berkus
Yeah, I get it. But I think standby would confuse them, too, just in a different set of situations. Other than PITR, what situations? PITR is used by a minority of our users. Binary replication, if not already used by a majority, will be in the future (it's certainly the majority of my

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 1:03 PM, Josh Berkus j...@agliodbs.com wrote: Yeah, I get it.  But I think standby would confuse them, too, just in a different set of situations. Other than PITR, what situations? Hot backup? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Josh Berkus
On 9/21/11 10:07 AM, Robert Haas wrote: On Wed, Sep 21, 2011 at 1:03 PM, Josh Berkus j...@agliodbs.com wrote: Yeah, I get it. But I think standby would confuse them, too, just in a different set of situations. Other than PITR, what situations? Hot backup? Hot backup == PITR. You're

Re: [HACKERS] [PERFORM] Constraint exclusion on UNION ALL subqueries with WHERE conditions

2011-09-21 Thread Tom Lane
=?ISO-8859-1?Q?Gunnlaugur_=DE=F3r_Briem?= gunnlau...@gmail.com writes: On Monday, September 19, 2011 3:59:30 AM UTC, Tom Lane wrote: Works for me in 8.4.8. Do you have constraint_exclusion set to ON? I did try with constraint_exclusion set to on, though the docs suggest partition should be

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 1:08 PM, Josh Berkus j...@agliodbs.com wrote: On 9/21/11 10:07 AM, Robert Haas wrote: On Wed, Sep 21, 2011 at 1:03 PM, Josh Berkus j...@agliodbs.com wrote: Yeah, I get it.  But I think standby would confuse them, too, just in a different set of situations. Other than

Re: [HACKERS] sequence locking

2011-09-21 Thread Andres Freund
On Wednesday 21 Sep 2011 19:03:17 Kevin Grittner wrote: Merlin Moncure mmonc...@gmail.com wrote: On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 12:22 PM, Euler Taveira de Oliveira eu...@timbira.com wrote: [This question doesn't belong to -hackers. Please post it in -general or -admin] -hackers or -bugs seems appropriate to me; I think this is a bug. 2.2. pg_start_backup(Obackup_under_loadš) on the master (this

Re: [HACKERS] sequence locking

2011-09-21 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It seems to have been allowed in prehistoric times. If you

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Aidan Van Dyk
On Wed, Sep 21, 2011 at 1:13 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Sep 21, 2011 at 1:08 PM, Josh Berkus j...@agliodbs.com wrote: On 9/21/11 10:07 AM, Robert Haas wrote: On Wed, Sep 21, 2011 at 1:03 PM, Josh Berkus j...@agliodbs.com wrote: Yeah, I get it.  But I think standby

Re: [HACKERS] unite recovery.conf and postgresql.conf

2011-09-21 Thread Aidan Van Dyk
On Wed, Sep 21, 2011 at 1:34 PM, Aidan Van Dyk ai...@highrise.ca wrote: And I think Tom touched on this point in the recovery.conf/recovery.done thread a bit too. Doh! That's this thread /me slinks away, ashamed for not even taking a close look at the to/cc list... -- Aidan Van Dyk    

Re: [HACKERS] sequence locking

2011-09-21 Thread Andres Freund
On Wednesday 21 Sep 2011 19:24:55 Tom Lane wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It

Re: [HACKERS] unaccent contrib

2011-09-21 Thread Euler Taveira de Oliveira
On 21-09-2011 13:28, Daniel Vázquez wrote: unaccent is compatible with postgresql 8.4 (but not is in their contrib version distribution) No, it is not. AFAICS it is necessary to add some backend code that is not in 8.4. -- Euler Taveira de Oliveira - Timbira

[HACKERS] HeapTupleSatisfiesToast not setting XMIN_COMMITTED?

2011-09-21 Thread Alvaro Herrera
Hi, I notice that HeapTupleSatisfiesToast is not setting the HEAP_XMIN_COMMITTED bit, though it is reading it. Is there a reason for this? It seems to me that it'd make sense to have it set ... unless it's set by some other routine, somehow? -- Álvaro Herrera alvhe...@alvh.no-ip.org --

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Andres Freund and...@anarazel.de wrote: On Wednesday 21 Sep 2011 19:24:55 Tom Lane wrote: One question is what you think the lock means. I believe for example that taking a non-exclusive regular table lock on a sequence would not prevent other sessions from doing nextval(); even an

Re: [HACKERS] sequence locking

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 12:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Merlin Moncure mmonc...@gmail.com wrote: On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking

Re: [HACKERS] unaccent contrib

2011-09-21 Thread Daniel Vázquez
... ok No alternatives for unaccent on 8.4? 2011/9/21 Euler Taveira de Oliveira eu...@timbira.com On 21-09-2011 13:28, Daniel Vázquez wrote: unaccent is compatible with postgresql 8.4 (but not is in their contrib version distribution) No, it is not. AFAICS it is necessary to add some

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Robert Haas
On Thu, Sep 15, 2011 at 11:57 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: s/atomic/barrier/ Oops. +/* + * A compiler barrier need not (and preferably should not) emit any actual + * machine code, but must act as an optimization fence: the compiler must not + *

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: But even a full explanation of that case seems like almost too much for the comment of a header file, and there are certainly far more complex cases. I think anyone who is using these primitives is going to have to do some independent reading...

Re: [HACKERS] HeapTupleSatisfiesToast not setting XMIN_COMMITTED?

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 1:03 PM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Hi, I notice that HeapTupleSatisfiesToast is not setting the HEAP_XMIN_COMMITTED bit, though it is reading it.  Is there a reason for this?  It seems to me that it'd make sense to have it set ... unless it's set

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 2:48 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: But even a full explanation of that case seems like almost too much for the comment of a header file, and there are certainly far more complex cases.  I think anyone who

Re: [HACKERS] HeapTupleSatisfiesToast not setting XMIN_COMMITTED?

2011-09-21 Thread Alvaro Herrera
Excerpts from Merlin Moncure's message of mié sep 21 16:02:34 -0300 2011: On Wed, Sep 21, 2011 at 1:03 PM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Hi, I notice that HeapTupleSatisfiesToast is not setting the HEAP_XMIN_COMMITTED bit, though it is reading it.  Is there a reason

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-09-21 Thread Simon Riggs
On Wed, Sep 21, 2011 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: This is a marvellous win, a huge gain from a small, isolated and easily tested change. By far the smallest amount of additional code to sorting we will have added and yet one of the

Re: [HACKERS] HeapTupleSatisfiesToast not setting XMIN_COMMITTED?

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 2:14 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Merlin Moncure's message of mié sep 21 16:02:34 -0300 2011: On Wed, Sep 21, 2011 at 1:03 PM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Hi, I notice that HeapTupleSatisfiesToast is not

Re: [HACKERS] WIP: SP-GiST, Space-Partitioned GiST

2011-09-21 Thread Heikki Linnakangas
On 05.09.2011 09:39, Oleg Bartunov wrote: I attached wrong patch in previous message, sorry ! Here is a last version. One little detail caught my eye: In spgSplitNodeAction, you call SpGistGetBuffer() within a critical section. That should be avoided, SpGistGetBuffer() can easily fail if you

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: On Wed, Sep 21, 2011 at 2:48 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: But even a full explanation of that case seems like almost too much for the comment of a header file, and there are certainly

Re: [HACKERS] unaccent contrib

2011-09-21 Thread Euler Taveira de Oliveira
On 21-09-2011 15:23, Daniel Vázquez wrote: No alternatives for unaccent on 8.4? Not that I know of. -- Euler Taveira de Oliveira - Timbira http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento -- Sent via pgsql-hackers mailing list

Re: [HACKERS] HeapTupleSatisfiesToast not setting XMIN_COMMITTED?

2011-09-21 Thread Tom Lane
Alvaro Herrera alvhe...@alvh.no-ip.org writes: I notice that HeapTupleSatisfiesToast is not setting the HEAP_XMIN_COMMITTED bit, though it is reading it. Is there a reason for this? It seems to me that it'd make sense to have it set ... unless it's set by some other routine, somehow? Hmm

Re: [HACKERS] HeapTupleSatisfiesToast not setting XMIN_COMMITTED?

2011-09-21 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: More interesting, however, is the fact that the XMAX_COMMITTED bit is never set either. I guess the rows are deleted by a different mechanism (tuptoaster probably) -- it isn't obvious how this works just by looking at tqual.c. It seems to do

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Gurjeet Singh
On Wed, Sep 14, 2011 at 4:29 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Aug 8, 2011 at 7:47 AM, Robert Haas robertmh...@gmail.com wrote: I've been thinking about this too and actually went so far as to do some research and put together something that I hope covers most of the

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 4:19 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Wed, Sep 14, 2011 at 4:29 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Aug 8, 2011 at 7:47 AM, Robert Haas robertmh...@gmail.com wrote: I've been thinking about this too and actually went so far as to do

Re: [HACKERS] unaccent contrib

2011-09-21 Thread Devrim GÜNDÜZ
On Wed, 2011-09-21 at 18:28 +0200, Daniel Vázquez wrote: Can Global Development Group, make some acumulative rpm for contrib modules that are backward compatible??? No (as the RPM maintainer). -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com PostgreSQL

Re: [HACKERS] unaccent contrib

2011-09-21 Thread Tom Lane
Euler Taveira de Oliveira eu...@timbira.com writes: On 21-09-2011 13:28, Daniel Vázquez wrote: unaccent is compatible with postgresql 8.4 (but not is in their contrib version distribution) No, it is not. AFAICS it is necessary to add some backend code that is not in 8.4. [ pokes at it ]

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Robert Haas
On Wed, Sep 21, 2011 at 3:39 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: On Wed, Sep 21, 2011 at 2:48 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: But even a full explanation of that case

Re: [HACKERS] memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

2011-09-21 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: there are three questions that you might want to answer here: 1. I have a new architecture and I want barrier.h to support it. What do I need to do? 2. What is the behavior of the various constructs provided by barrier.h? 3. Why would I

Re: [HACKERS] EXPLAIN and nfiltered, take two

2011-09-21 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Sep 20, 2011 at 8:19 PM, Tom Lane t...@sss.pgh.pa.us wrote: I find it useless and probably confusing to put out Rows Removed by Recheck Cond: 0 unless we're dealing with a lossy index. I don't really see the point of this. I think printing it

Re: [HACKERS] Double sorting split patch

2011-09-21 Thread Alexander Korotkov
I've processed the results of the tests with double sorting split which I've sheduled for buffering build. I've updated wiki page with them: http://wiki.postgresql.org/wiki/Fast_GiST_index_build_GSoC_2011#Testing_results Raw results of query speed measues are in the attachment. There number of

[HACKERS] citext operator precedence fix

2011-09-21 Thread Josh Berkus
All, I just tripped over this: select 'josh'::varchar(32) = 'Josh'::citext; ?column? -- f While it's clear why it's that way, it's not how people would expect citext to behave. Users expect case-insensitive text to be case-insensitive for *all* comparisons, not just for comparisons

Re: [HACKERS] citext operator precedence fix

2011-09-21 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: I'd like to patch the citext contrib module for 9.2 to fix this by creating four new = operators to establish the comparison function for text and varchar. I think you'll find that's easier said than done (problem 1 is going to be ambiguity, and problem 2

Re: [HACKERS] citext operator precedence fix

2011-09-21 Thread Josh Berkus
I think you'll find that's easier said than done (problem 1 is going to be ambiguity, Ambiguity? and problem 2 is going to be that comparisons involving these operators won't get indexed). Yeah, that's acceptable, since it's not any worse than the behavior of the comparisons now. --

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Florian Pflug
On Sep21, 2011, at 19:00 , Jeff Davis wrote: While we're at it, any suggestions on the text representation of an empty range? My personal favourite would be '0', since it resembles the symbol used for empty sets in mathematics, and we already decided to use mathematical notation for ranges. If

Re: [HACKERS] [v9.2] make_greater_string() does not return a string in some cases

2011-09-21 Thread Robert Haas
On Tue, Sep 13, 2011 at 10:13 PM, Kyotaro HORIGUCHI horiguchi.kyot...@oss.ntt.co.jp wrote: This is rebased patch of `Allow encoding specific character incrementer'(https://commitfest.postgresql.org/action/patch_view?id=602). Addition to the patch, increment sanity check program for new

Re: [HACKERS] Range Types - typo + NULL string constructor

2011-09-21 Thread Florian Pflug
On Sep21, 2011, at 19:02 , Jeff Davis wrote: On Wed, 2011-09-21 at 13:24 +0200, Florian Pflug wrote: I've thought about this some more, and came to realize that the question here really is whether floatrange(0, 'Infinity'::float, '[)') and floatrange(0, NULL, '[)') are the same

Re: [HACKERS] citext operator precedence fix

2011-09-21 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: I think you'll find that's easier said than done (problem 1 is going to be ambiguity, Ambiguity? Yeah, I'm worried about the possibility of parser failing to resolve which operator is meant. and problem 2 is going to be that comparisons involving

Re: [HACKERS] citext operator precedence fix

2011-09-21 Thread Josh Berkus
Ambiguity? Yeah, I'm worried about the possibility of parser failing to resolve which operator is meant. Any idea of how to test for that? What kind of situations would make things difficult for the parser? Also, how is this any different for any optional data type which overrides = ?

Re: [HACKERS] Separating bgwriter and checkpointer

2011-09-21 Thread Greg Smith
On 09/20/2011 09:35 AM, Heikki Linnakangas wrote: Yeah, I was thinking of write()s, not fsyncs. I agree this might have some effect during fsync phase. Right; that's where the most serious problems seem to pop up at anyway now. All the testing I did earlier this year suggested Linux at least

  1   2   >