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 postg...@cybertec.at: 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

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.

[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 in

[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

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 robertmh...@gmail.com writes: On Tue, Feb 22, 2011 at 5:24 PM, Tom Lane t...@sss.pgh.pa.us 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

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

Re: [HACKERS] PostgreSQL FDW update

2011-02-23 Thread Shigeru HANADA
On Tue, 22 Feb 2011 11:33:25 -0500 Robert Haas robertmh...@gmail.com 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

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 and...@dunslane.net 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

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

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 12:50 AM, Nathan Boley npbo...@gmail.com 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

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

2011-02-23 Thread Robert Haas
2011/2/23 PostgreSQL - Hans-Jürgen Schönig postg...@cybertec.at: 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

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 such an ugly

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 npbo...@gmail.com 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:

[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] Correctly producing array literals for prepared statements

2011-02-23 Thread Peter Geoghegan
On 23 February 2011 04:36, Greg Stark gsst...@mit.edu 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

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

2011-02-23 Thread Robert Haas
2011/2/23 PostgreSQL - Hans-Jürgen Schönig postg...@cybertec.at: 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

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 Starkgsst...@mit.edu 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

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Tom Lane
rsmogura rsmog...@softperience.eu 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

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 Starkgsst...@mit.edu 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

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 and...@dunslane.net wrote: On 02/23/2011 10:09 AM, Peter Geoghegan wrote: On 23 February 2011 04:36, Greg Starkgsst...@mit.edu  wrote: This is only true for server encodings. In a client library I think you lose on this and do have to deal with

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

2011-02-23 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com 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

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 peter.geoghega...@gmail.com 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

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 Starkgsst...@mit.edu wrote: This is only true for server encodings. In a client library I think you lose on this and do

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 peter.geoghega...@gmail.com wrote: I'm investigating the possibility of developing a utility function for our C++ client library, libpqxx, that produces array literals that can

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] Binary in/out for aclitem

2011-02-23 Thread Radosław Smogura
Tom Lane t...@sss.pgh.pa.us Wednesday 23 February 2011 16:19:27 rsmogura rsmog...@softperience.eu 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

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Radosław Smogura
Tom Lane t...@sss.pgh.pa.us Wednesday 23 February 2011 16:19:27 rsmogura rsmog...@softperience.eu 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

Re: [HACKERS] Synchronous standbys?

2011-02-23 Thread Jaime Casanova
On Wed, Feb 23, 2011 at 3:42 AM, Tatsuo Ishii is...@postgresql.org 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

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

2011-02-23 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com 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

Re: [HACKERS] Synchronous standby

2011-02-23 Thread Jaime Casanova
On Wed, Feb 23, 2011 at 3:49 AM, Tatsuo Ishii is...@postgresql.org 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.

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

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 run.

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Robert Haas
On Fri, Feb 18, 2011 at 5:47 PM, Robert Haas robertmh...@gmail.com 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

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 robertmh...@gmail.com 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

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 1:05 PM, Alvaro Herrera alvhe...@commandprompt.com 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 robertmh...@gmail.com wrote: 16. synchronized snapshots.  Alvaro is working on this one. Lots

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Radosław Smogura
Tom Lane t...@sss.pgh.pa.us Wednesday 23 February 2011 16:19:27 rsmogura rsmog...@softperience.eu 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

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 alvhe...@commandprompt.com 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 robertmh...@gmail.com

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 alvhe...@commandprompt.com 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

Re: [HACKERS] disposition of remaining patches

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 1:34 PM, Alvaro Herrera alvhe...@commandprompt.com 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 alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié feb 23 14:54:02

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

2011-02-23 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com 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

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 alvhe...@commandprompt.com 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

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 alvhe...@commandprompt.com The PostgreSQL Company - Command

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

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 alvhe...@commandprompt.com 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

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

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

2011-02-23 Thread Peter Geoghegan
On 23 February 2011 15:34, Merlin Moncure mmonc...@gmail.com 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

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 alvhe...@commandprompt.com 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

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: patch Here's the patch rebased against the master. No code changes since the last patch I sent. Having a look at this. -- Álvaro Herrera

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 Moncuremmonc...@gmail.com 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

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

2011-02-23 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com 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

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] 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 Moncuremmonc...@gmail.com wrote: You can send nested arrays safely. You just have to be very formal about escaping *everything* both as you get it

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

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com 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

Re: [HACKERS] Binary in/out for aclitem

2011-02-23 Thread Tom Lane
=?utf-8?q?Rados=C5=82aw_Smogura?= rsmog...@softperience.eu 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

[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] 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 database

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

2011-02-23 Thread Bruce Momjian
Robert Haas wrote: 2011/2/23 PostgreSQL - Hans-J?rgen Sch?nig postg...@cybertec.at: 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

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com 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: patch Here's the patch rebased against the master. No code changes since the last patch I sent. Having a look

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

[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,

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

2011-02-23 Thread Kevin Grittner
Andrew Tipton andrew.t.tip...@gmail.com 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

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi 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

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 alvhe...@commandprompt.com 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: patch Here's the patch rebased against the

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Marko Tiikkaja
On 2011-02-24 2:31 AM, Tom Lane wrote: Marko Tiikkajamarko.tiikk...@cs.helsinki.fi 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

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-23 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com 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

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

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 flames of

Re: [HACKERS] Synchronous standby

2011-02-23 Thread Tatsuo Ishii
On Wed, Feb 23, 2011 at 3:49 AM, Tatsuo Ishii is...@postgresql.org 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

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

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 8:09 PM, Josh Berkus j...@agliodbs.com 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

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 t...@sss.pgh.pa.us 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

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] 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] WIP: cross column correlation ...

2011-02-23 Thread Robert Haas
On Wed, Feb 23, 2011 at 10:30 PM, Bruce Momjian br...@momjian.us 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

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 provided a method

Re: [HACKERS] Sync Rep v17

2011-02-23 Thread Daniel Farina
On Fri, Feb 18, 2011 at 4:06 PM, Simon Riggs si...@2ndquadrant.com 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

Re: [HACKERS] Sync Rep v17

2011-02-23 Thread Daniel Farina
On Wed, Feb 23, 2011 at 10:39 PM, Daniel Farina dan...@heroku.com wrote: On Fri, Feb 18, 2011 at 4:06 PM, Simon Riggs si...@2ndquadrant.com 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.