Re: [HACKERS] Sync Rep v17

2011-02-23 Thread Daniel Farina
On Wed, Feb 23, 2011 at 10:39 PM, Daniel Farina wrote: > On Fri, Feb 18, 2011 at 4:06 PM, Simon Riggs wrote: >> >> Well, good news all round. >> >> v17 implements what I believe to be the final set of features for sync >> rep. This one I'm actually fairly happy with. It can be enjoyed best at >>

Re: [HACKERS] Sync Rep v17

2011-02-23 Thread Daniel Farina
On Fri, Feb 18, 2011 at 4:06 PM, Simon Riggs wrote: > > Well, good news all round. > > v17 implements what I believe to be the final set of features for sync > rep. This one I'm actually fairly happy with. It can be enjoyed best at > DEBUG3. I've been messing with this patch and am wondering if t

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread PostgreSQL - Hans-Jürgen Schönig
On Feb 24, 2011, at 2:09 AM, Josh Berkus wrote: > >> Personally, I think the first thing we ought to do is add a real, bona >> fide planner hint to override the selectivity calculation manually, >> maybe something like this: >> >> WHERE (x < 5 AND y = 1) SELECTIVITY (0.1); >> >> Then, having pr

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 10:30 PM, Bruce Momjian wrote: > Robert Haas wrote: >> If you want to take the above as in any way an exhaustive survey of >> the landscape (which it isn't), C seems like a standout, maybe >> augmented by the making the planner able to notice that A1 = x1 AND A2 >> = x2 is

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Bruce Momjian
Robert Haas wrote: > If you want to take the above as in any way an exhaustive survey of > the landscape (which it isn't), C seems like a standout, maybe > augmented by the making the planner able to notice that A1 = x1 AND A2 > = x2 is equivalent to (A1,A2) = (x1, x2) so you don't have to rewrite

Re: [HACKERS] Synchronous standbys?

2011-02-23 Thread Tatsuo Ishii
> there could be only one standby at the same time... > in the original patch there could be several synchronous standby > servers and the primary was going to wait until the first one of them > to answer, but that was removed and replaced by a list of possible > synch standby servers and the first

Re: [HACKERS] Possible substitute for PostmasterIsAlive polling loops

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 4:54 PM, Tom Lane wrote: > IOW, at least on Linux, you *can* arrange to get a signal when your > parent process dies. That's pretty cool. > Not sure how ugly it'd be to use this call when available and a time > delay when not, but it's something to think about. Yeah. It

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 8:09 PM, Josh Berkus wrote: >> Personally, I think the first thing we ought to do is add a real, bona >> fide planner hint to override the selectivity calculation manually, >> maybe something like this: >> >> WHERE (x < 5 AND y = 1) SELECTIVITY (0.1); >> >> Then, having pro

Re: [HACKERS] Synchronous standby

2011-02-23 Thread Tatsuo Ishii
> On Wed, Feb 23, 2011 at 3:49 AM, Tatsuo Ishii wrote: >> In 9.1, we will be able to have synchrnous replication. Also we have >> one standby server chosen by primary to be the synchronous standby >> (still I'm not sure this is correct or not as stated in another mail). >> > > yes, it is. a list

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Josh Berkus
> Personally, I think the first thing we ought to do is add a real, bona > fide planner hint to override the selectivity calculation manually, > maybe something like this: > > WHERE (x < 5 AND y = 1) SELECTIVITY (0.1); > > Then, having provided a method for the DBA to extinguish the raging > fla

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Marko Tiikkaja
On 2011-02-24 2:35 AM, Alvaro Herrera wrote: There was some restructuring in code in postgres.c to be done near this patch, which wasn't attacked at all by Marko AFAICS. Maybe I should be looking at that instead. I don't feel at all comfortable doing the restructuring you guys have been talki

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Tom Lane's message of mié feb 23 19:39:23 -0300 2011: >> My recollection is that this was pretty tightly coupled to the wCTE >> patch. I had been intending to review them together, and have just >> now come up for air enough to start doing that. Do you rea

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Marko Tiikkaja
On 2011-02-24 2:31 AM, Tom Lane wrote: Marko Tiikkaja writes: On 2011-02-24 12:39 AM, Tom Lane wrote: My recollection is that this was pretty tightly coupled to the wCTE patch. It was, but isn't anymore. Now it's just a bugfix. The connection is the question of where to do CommandCounter

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mié feb 23 19:39:23 -0300 2011: > Alvaro Herrera writes: > > Excerpts from Marko Tiikkaja's message of sáb ene 15 17:30:14 -0300 2011: > >> On 2010-10-21 3:32 PM +0200, Marko Tiikkaja wrote: > > > >> > >> Here's the patch rebased against the master. No code c

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Tom Lane
Marko Tiikkaja writes: > On 2011-02-24 12:39 AM, Tom Lane wrote: >> My recollection is that this was pretty tightly coupled to the wCTE >> patch. > It was, but isn't anymore. Now it's just a bugfix. The connection is the question of where to do CommandCounterIncrement between successive DML WIT

Re: [HACKERS] Patch: add GiST support for BOX @> POINT queries

2011-02-23 Thread Kevin Grittner
Andrew Tipton wrote: > should I add this to CF-Next? Yes. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Patch: add GiST support for BOX @> POINT queries

2011-02-23 Thread Andrew Tipton
While playing around with the BOX and POINT datatypes, I was surprised to note that BOX @> POINT (and likewise POINT <@ BOX) queries were not using the GiST index I had created on the BOX column. The attached patch adds a new strategy @>(BOX,POINT) to the box_ops opclass. Internally, gist_box_con

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Marko Tiikkaja
On 2011-02-24 12:39 AM, Tom Lane wrote: My recollection is that this was pretty tightly coupled to the wCTE patch. It was, but isn't anymore. Now it's just a bugfix. Regards, Marko Tiikkaja -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscri

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Marko Tiikkaja's message of sáb ene 15 17:30:14 -0300 2011: >> On 2010-10-21 3:32 PM +0200, Marko Tiikkaja wrote: > >> >> Here's the patch rebased against the master. No code changes since the >> last patch I sent. > Having a look at this. My recollect

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Bruce Momjian
Robert Haas wrote: > 2011/2/23 PostgreSQL - Hans-J?rgen Sch?nig : > > i thought there was an agreement that we don't want planner hints? > > Well, I want them. I think some other people do, too. Whether those > people are more numerous than than the people who don't want them, and > how much tha

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Bruce Momjian
PostgreSQL - Hans-J?rgen Sch?nig wrote: > > Those are real problems, but I still want it. The last time I hit > > this problem I spent two days redesigning my schema and adding > > triggers all over the place to make things work. If I had been > > dealing with a 30TB database instead of a 300MB d

[HACKERS] Possible substitute for PostmasterIsAlive polling loops

2011-02-23 Thread Tom Lane
We've touched a few times on trying to get rid of the sleep-awhile-and-check-for-something-to-do loops in PG's auxiliary processes, mainly to satisfy people who complain about CPU power consumption when idle. I can see how most of the something-to-do checks can be reimplemented using latches, but

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Tom Lane
=?utf-8?q?Rados=C5=82aw_Smogura?= writes: > Here is extended version, has version field (N_ACL_RIGHTS*2) and reserved > mask, as well definition is more general then def of PGSQL. In any way it > require that rights mades bit array. You're going in quite the wrong direction here. The consensus

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Radosław Smogura's message of mié feb 23 15:18:22 -0300 2011: >> Btw, Is it possible and needed to add group byte, indicating that grantee is >> group or user? > There are no groups or users, only roles. Even if there were, this is not part of the value

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Andrew Chernow
It's probably fine if you can control both ends. But there is no guarantee of portability, nor does it seem likely to me there ever will be, so I don't find your assertion terribly useful. The fact that it hasn't broken for you doesn't mean it can't or won't be. All true. If you change the

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Kenneth Marshall
On Wed, Feb 23, 2011 at 03:34:45PM -0500, Andrew Chernow wrote: > On 2/23/2011 3:06 PM, Peter Geoghegan wrote: >> On 23 February 2011 15:34, Merlin Moncure wrote: >>> You can send nested arrays safely. You just have to be very formal >>> about escaping *everything* both as you get it and as it go

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Andrew Dunstan
On 02/23/2011 02:21 PM, Andrew Chernow wrote: Binary mode had serious limitations, such as portability. What are the other limitations? As far as portability is concerned, we are using it on many different operating systems and architectures without issue. Even our most recent bump to

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Kevin Grittner
Alvaro Herrera wrote: > Excerpts from Kevin Grittner's message: > No strong opinion on this, really, but your strcpy should use a > StringInfo buffer instead of the char[200]. That's going to bite > someone. Yeah, this was thrown together in a bit of a hurry because of development deadlines h

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Andrew Chernow
On 2/23/2011 3:06 PM, Peter Geoghegan wrote: On 23 February 2011 15:34, Merlin Moncure wrote: You can send nested arrays safely. You just have to be very formal about escaping *everything* both as you get it and as it goes into the container. This is what postgres does on the backend as it se

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Alvaro Herrera
Excerpts from Marko Tiikkaja's message of sáb ene 15 17:30:14 -0300 2011: > On 2010-10-21 3:32 PM +0200, Marko Tiikkaja wrote: > > > > Here's the patch rebased against the master. No code changes since the > last patch I sent. Having a look at this. -- Álvaro Herrera The PostgreSQL Company

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié feb 23 17:03:23 -0300 2011: > On Wed, Feb 23, 2011 at 2:48 PM, Alvaro Herrera > wrote: > > Is this intended for 9.1? > > Kevin already expressed his intention to add this to the first 9.2CF. > It's far too late to BEGIN discussing new features for 9.1.

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Peter Geoghegan
On 23 February 2011 15:34, Merlin Moncure wrote: > You can send nested arrays safely.  You just have to be very formal > about escaping *everything* both as you get it and as it goes into the > container.  This is what postgres does on the backend as it sends > arrays out the door in text.  It mig

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Andrew Chernow
Binary mode had serious limitations, such as portability. What are the other limitations? As far as portability is concerned, we are using it on many different operating systems and architectures without issue. Even our most recent bump to 9.0.1 and 9.0.3 was flawless in regard to libpq/l

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 2:48 PM, Alvaro Herrera wrote: > Is this intended for 9.1? Kevin already expressed his intention to add this to the first 9.2CF. It's far too late to BEGIN discussing new features for 9.1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Greg Smith
Robert Haas wrote: 2. Synchronous replication. Splitting up this patch has allowed some This has gotten a bunch of review, on several different threads. I assume Simon will publish an update when he gets back to his keyboard... That was the idea. If anyone has any serious concerns a

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Alvaro Herrera
Excerpts from Radosław Smogura's message of mié feb 23 15:18:22 -0300 2011: > Btw, Is it possible and needed to add group byte, indicating that grantee is > group or user? There are no groups or users, only roles. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Repl

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Alvaro Herrera
Excerpts from Kevin Grittner's message of mié feb 23 16:20:16 -0300 2011: > Alvaro Herrera wrote: > > > Why not use quote_identifier and quote_literal_cstr instead of > > this new strcpy thing? > > We've got various types of software that will be parsing these > payloads, and it's a little eas

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Kevin Grittner
Alvaro Herrera wrote: > Why not use quote_identifier and quote_literal_cstr instead of > this new strcpy thing? We've got various types of software that will be parsing these payloads, and it's a little easier to parse if the quoting is unconditional. If that's a barrier to acceptance we coul

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 1:34 PM, Alvaro Herrera wrote: > Excerpts from Robert Haas's message of mié feb 23 15:14:04 -0300 2011: >> On Wed, Feb 23, 2011 at 1:05 PM, Alvaro Herrera >> wrote: >> > Excerpts from Robert Haas's message of mié feb 23 14:54:02 -0300 2011: >> >> On Fri, Feb 18, 2011 at 5:

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Alvaro Herrera
Excerpts from Kevin Grittner's message of mié feb 23 13:43:19 -0300 2011: > Alvaro Herrera wrote: > > > I think it'd be better to use RelationGetIndexList (which gets the > > index list from relcache) and fetch the index tuples from > > syscache; see relationHasPrimaryKey for sample code. > >

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié feb 23 15:14:04 -0300 2011: > On Wed, Feb 23, 2011 at 1:05 PM, Alvaro Herrera > wrote: > > Excerpts from Robert Haas's message of mié feb 23 14:54:02 -0300 2011: > >> On Fri, Feb 18, 2011 at 5:47 PM, Robert Haas wrote: > > > >> > 16. synchronized snapsho

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Radosław Smogura
Tom Lane Wednesday 23 February 2011 16:19:27 > rsmogura writes: > > On Tue, 22 Feb 2011 20:20:39 -0500, Tom Lane wrote: > >> ... But my question isn't about that; it's about > >> why aclitem should be considered a first-class citizen. It makes me > >> uncomfortable that client apps are looking

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 1:05 PM, Alvaro Herrera wrote: > Excerpts from Robert Haas's message of mié feb 23 14:54:02 -0300 2011: >> On Fri, Feb 18, 2011 at 5:47 PM, Robert Haas wrote: > >> > 16. synchronized snapshots.  Alvaro is working on this one. >> >> Lots of discussion of this one, but curre

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié feb 23 14:54:02 -0300 2011: > On Fri, Feb 18, 2011 at 5:47 PM, Robert Haas wrote: > > 16. synchronized snapshots.  Alvaro is working on this one. > > Lots of discussion of this one, but current status is not clear to me. > Alvaro, are you working on th

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Robert Haas
On Fri, Feb 18, 2011 at 5:47 PM, Robert Haas wrote: > The CommitFest application currently reflects 17 remaining patches for > CommitFest 2011-01. Now we're down to 12. As usual, the last few patches take the longest... > 1. Change pg_last_xlog_receive_location not to move backwards.  We > don'

Re: [HACKERS] Fix for Index Advisor related hooks

2011-02-23 Thread Gurjeet Singh
On Fri, Feb 18, 2011 at 1:36 PM, Heikki Linnakangas < heikki.linnakan...@enterprisedb.com> wrote: > On 18.02.2011 17:02, Gurjeet Singh wrote: > > Another use case of the Index Advisor is to be switched on for a few hours >> while the application runs, and gather the recommendations for the whole

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Andrew Dunstan
On 02/23/2011 10:40 AM, Kenneth Marshall wrote: Can someone please point me in the direction of an established client library/driver where all corner cases are covered, or at least enough of them to produce a net gain in usefulness? There may well be additional subtleties that have not occurr

Re: [HACKERS] Synchronous standby

2011-02-23 Thread Jaime Casanova
On Wed, Feb 23, 2011 at 3:49 AM, Tatsuo Ishii wrote: > In 9.1, we will be able to have synchrnous replication. Also we have > one standby server chosen by primary to be the synchronous standby > (still I'm not sure this is correct or not as stated in another mail). > yes, it is. a list of possibl

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Kevin Grittner
Alvaro Herrera wrote: > I think it'd be better to use RelationGetIndexList (which gets the > index list from relcache) and fetch the index tuples from > syscache; see relationHasPrimaryKey for sample code. Thanks. Patch done that way attached. Will get it into tomorrow's system testing here.

Re: [HACKERS] Synchronous standbys?

2011-02-23 Thread Jaime Casanova
On Wed, Feb 23, 2011 at 3:42 AM, Tatsuo Ishii wrote: > > It seems there's only one synchronous standby allowed at the same > time. > > Does anybody know which one is correct? there could be only one standby at the same time... in the original patch there could be several synchronous standby serve

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Radosław Smogura
Tom Lane Wednesday 23 February 2011 16:19:27 > rsmogura writes: > > On Tue, 22 Feb 2011 20:20:39 -0500, Tom Lane wrote: > >> ... But my question isn't about that; it's about > >> why aclitem should be considered a first-class citizen. It makes me > >> uncomfortable that client apps are looking

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Radosław Smogura
Tom Lane Wednesday 23 February 2011 16:19:27 > rsmogura writes: > > On Tue, 22 Feb 2011 20:20:39 -0500, Tom Lane wrote: > >> ... But my question isn't about that; it's about > >> why aclitem should be considered a first-class citizen. It makes me > >> uncomfortable that client apps are looking

Re: [HACKERS] pl/python quoting functions

2011-02-23 Thread Peter Eisentraut
On ons, 2011-02-23 at 11:26 +0100, Jan Urbański wrote: > One thing: you removed the conditional pfree from PLy_quote_ident, > which makes this function leak memory if the actual quoting took > place, no? Is that leak too small to worry about? Many functions in PostgreSQL leak memory in this way.

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Kenneth Marshall
On Wed, Feb 23, 2011 at 09:34:06AM -0600, Merlin Moncure wrote: > On Tue, Feb 22, 2011 at 10:16 PM, Peter Geoghegan > wrote: > > I'm investigating the possibility of developing a utility function for > > our C++ client library, libpqxx, that produces array literals that can > > be used in prepared

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Andrew Dunstan
On 02/23/2011 10:22 AM, Heikki Linnakangas wrote: On 23.02.2011 17:16, Andrew Dunstan wrote: On 02/23/2011 10:09 AM, Peter Geoghegan wrote: On 23 February 2011 04:36, Greg Stark wrote: This is only true for server encodings. In a client library I think you lose on this and do have to deal wi

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Merlin Moncure
On Tue, Feb 22, 2011 at 10:16 PM, Peter Geoghegan wrote: > I'm investigating the possibility of developing a utility function for > our C++ client library, libpqxx, that produces array literals that can > be used in prepared statements. This problem appears to be a bit of a > tar pit, so I'm hopin

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Tom Lane
Heikki Linnakangas writes: > On 23.02.2011 17:16, Andrew Dunstan wrote: >> On 02/23/2011 10:09 AM, Peter Geoghegan wrote: >>> I'm pretty sure all of the client encodings Tatsuo mentions are ASCII >>> supersets. >> They are not. It's precisely because they are not that they are not >> allowed as s

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Greg Stark
On Wed, Feb 23, 2011 at 3:16 PM, Andrew Dunstan wrote: > On 02/23/2011 10:09 AM, Peter Geoghegan wrote: >> >> On 23 February 2011 04:36, Greg Stark  wrote: >>> >>> This is only true for server encodings. In a client library I think >>> you lose on this and do have to deal with it. I'm not sure wha

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Heikki Linnakangas
On 23.02.2011 17:16, Andrew Dunstan wrote: On 02/23/2011 10:09 AM, Peter Geoghegan wrote: On 23 February 2011 04:36, Greg Stark wrote: This is only true for server encodings. In a client library I think you lose on this and do have to deal with it. I'm not sure what client encodings we do suppo

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Tom Lane
rsmogura writes: > On Tue, 22 Feb 2011 20:20:39 -0500, Tom Lane wrote: >> ... But my question isn't about that; it's about >> why aclitem should be considered a first-class citizen. It makes me >> uncomfortable that client apps are looking at it at all, because any >> that do are bound to get

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Andrew Dunstan
On 02/23/2011 10:09 AM, Peter Geoghegan wrote: On 23 February 2011 04:36, Greg Stark wrote: This is only true for server encodings. In a client library I think you lose on this and do have to deal with it. I'm not sure what client encodings we do support that aren't ascii-supersets though, it

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Robert Haas
2011/2/23 PostgreSQL - Hans-Jürgen Schönig : > i thought there was an agreement that we don't want planner hints? Well, I want them. I think some other people do, too. Whether those people are more numerous than than the people who don't want them, and how much that matters either way, is anothe

Re: [HACKERS] Correctly producing array literals for prepared statements

2011-02-23 Thread Peter Geoghegan
On 23 February 2011 04:36, Greg Stark wrote: > This is only true for server encodings. In a client library I think > you lose on this and do have to deal with it. I'm not sure what client > encodings we do support that aren't ascii-supersets though, it's > possible none of them generate quote char

[HACKERS] WIP: collect frequency statistics for arrays

2011-02-23 Thread Alexander Korotkov
WIP patch of statistics collection for arrays is attached. It generally copies statistics collection for tsvector, but there are following differencies: 1) Default comparison, hash and equality function for element data type is used (from corresponding default operator classes). 2) Operators @> and

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread PostgreSQL - Hans-Jürgen Schönig
On Feb 23, 2011, at 3:46 PM, Robert Haas wrote: > On Wed, Feb 23, 2011 at 12:50 AM, Nathan Boley wrote: >>> Personally, I think the first thing we ought to do is add a real, bona >>> fide planner hint to override the selectivity calculation manually, >>> maybe something like this: >>> >>> WHERE

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread PostgreSQL - Hans-Jürgen Schönig
>>> >> >> cheapest and easiest solution if you run into this: add "fake" functions >> which the planner cannot estimate properly. >> use OR to artificially prop up estimates or use AND to artificially lower >> them. there is actually no need to redesign the schema to get around it but >> it is

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Robert Haas
2011/2/23 PostgreSQL - Hans-Jürgen Schönig : >> Those are real problems, but I still want it.  The last time I hit >> this problem I spent two days redesigning my schema and adding >> triggers all over the place to make things work.  If I had been >> dealing with a 30TB database instead of a 300MB

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 12:50 AM, Nathan Boley wrote: >> Personally, I think the first thing we ought to do is add a real, bona >> fide planner hint to override the selectivity calculation manually, >> maybe something like this: >> >> WHERE (x < 5 AND y = 1) SELECTIVITY (0.1); > > If you're going

Re: [HACKERS] How to extract a value from a record using attnum or attname?

2011-02-23 Thread Alvaro Herrera
Excerpts from Kevin Grittner's message of mar feb 22 20:29:26 -0300 2011: > Andrew Dunstan wrote: > > > Have you performance tested it? Scanning pg_index for index > > columns for each row strikes me as likely to be unpleasant. > > I haven't, yet. I had rather assumed that the index info for

Re: [HACKERS] PostgreSQL FDW update

2011-02-23 Thread Shigeru HANADA
On Tue, 22 Feb 2011 11:33:25 -0500 Robert Haas wrote: > Is anyone actually working on a new version of this patch sufficiently > rapidly that we can expect a new version in the next day or two? > > If not, I think we mark this one Returned with Feedback and revisit it for > 9.2. I'm working on

Re: [HACKERS] pl/python quoting functions

2011-02-23 Thread Jan Urbański
On 22/02/11 22:48, Peter Eisentraut wrote: > Committed this, with two changes: Changed some things around with the > way const char * is propagated. Just casting it away is not nice. Also > dropped the error tests in the _quote.sql regression test. This > generates three different wordings of e

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread rsmogura
On Tue, 22 Feb 2011 20:20:39 -0500, Tom Lane wrote: Robert Haas writes: On Tue, Feb 22, 2011 at 5:24 PM, Tom Lane wrote: It'd be more future-proof than this patch, but I'm still unconvinced about the use-case. Do we want to intentionally make binary format a second-class citizen? Well,

[HACKERS] Synchronous standby

2011-02-23 Thread Tatsuo Ishii
In 9.1, we will be able to have synchrnous replication. Also we have one standby server chosen by primary to be the synchronous standby (still I'm not sure this is correct or not as stated in another mail). Is there anyway to know which is the synchronous standby? IMO this is important for users b

[HACKERS] Synchronous standbys?

2011-02-23 Thread Tatsuo Ishii
Reading documents coming with Simon's patches, I'm a little bit confused by the idea of "synchronous standbys". In the sgmls doc, "The commit wait will last until the first reply from any standby. Multiple standby servers allow increased availability and possibly increase performance as well." So

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread PostgreSQL - Hans-Jürgen Schönig
> Those are real problems, but I still want it. The last time I hit > this problem I spent two days redesigning my schema and adding > triggers all over the place to make things work. If I had been > dealing with a 30TB database instead of a 300MB database I would have > been royally up a creek.

Re: [HACKERS] WIP: cross column correlation ...

2011-02-23 Thread PostgreSQL - Hans-Jürgen Schönig
On Feb 23, 2011, at 2:58 AM, Robert Haas wrote: > 2011/2/22 PostgreSQL - Hans-Jürgen Schönig : >> how does it work? we try to find suitable statistics for an arbitrary length >> list of conditions so that the planner can use it directly rather than >> multiplying all the selectivities. this sho