Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Simon Riggs
On Thu, Jul 28, 2011 at 3:51 AM, Robert Haas robertmh...@gmail.com wrote: All that having been said, even if I haven't made any severe conceptual errors in the above, I'm not sure how well it will work in practice.  On the plus side, taking a snapshot becomes O(1) rather than O(MaxBackends) -

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Florian Pflug
On Jul28, 2011, at 04:51 , Robert Haas wrote: One fly in the ointment is that 8-byte stores are apparently done as two 4-byte stores on some platforms. But if the counter runs backward, I think even that is OK. If you happen to read an 8 byte value as it's being written, you'll get 4 bytes

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Wed, Oct 20, 2010 at 10:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether we could do something involving WAL properties --- the current tuple visibility logic was designed before WAL existed, so it's not exploiting that resource at all. I'm imagining that the kernel of a

Re: [HACKERS] How to use CreateFunctionStmt's RETURN TABLE?

2011-07-28 Thread Dickson S. Guedes
2011/7/26 _石头 tanji...@qq.com: [... cut ...]           I do not know how to use the second syntax:RETURNS TABLE '(' table_func_column_list ')' createfunc_opt_list opt_definition.           May someone help me to write a simple example of this syntax!  Thank you very much. Looking forward for

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 3:46 AM, Simon Riggs si...@2ndquadrant.com wrote: Sounds like the right set of thoughts to be having. Thanks. If you do this, you must cover subtransactions and Hot Standby. Work in this area takes longer than you think when you take the complexities into account, as

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 4:16 AM, Florian Pflug f...@phlo.org wrote: On Jul28, 2011, at 04:51 , Robert Haas wrote: One fly in the ointment is that 8-byte stores are apparently done as two 4-byte stores on some platforms. But if the counter runs backward, I think even that is OK.  If you happen

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 6:50 AM, Hannu Krosing ha...@2ndquadrant.com wrote: On Wed, Oct 20, 2010 at 10:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether we could do something involving WAL properties --- the current tuple visibility logic was designed before WAL existed, so it's

Re: [HACKERS] Check constraints on partition parents only?

2011-07-28 Thread Nikhil Sontakke
Now that we have coninhcnt, conislocal etc... we can probably support ONLY. But I agree with Robert it's probably a bit more than an afternoon to crank out :-) Heh, agreed :), I was just looking for some quick and early feedback. So what we need is basically a way to indicate that a

Re: [HACKERS] patch: move dumpUserConfig call in dumpRoles function of pg_dumpall.c

2011-07-28 Thread Robert Haas
On Wed, Jul 27, 2011 at 7:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Phil Sorber p...@omniti.com writes: Currently if you use 'ALTER ROLE rolename SET ROLE', pg_dumpall will dump an 'ALTER ROLE' out right after the 'CREATE ROLE' statement. I think pg_dumpall is the very least of your problems

Re: [HACKERS] error: could not find pg_class tuple for index 2662

2011-07-28 Thread Robert Haas
On Wed, Jul 27, 2011 at 8:28 PM, daveg da...@sonic.net wrote: My client has been seeing regular instances of the following sort of problem: On what version of PostgreSQL? If simplicity worked, the world would be overrun with insects. I thought it was... :-) -- Robert Haas EnterpriseDB:

Re: [HACKERS] Check constraints on partition parents only?

2011-07-28 Thread Tom Lane
Nikhil Sontakke nikhil.sonta...@enterprisedb.com writes: What we need is to persist information of a particular constraint to be as specified - ONLY for this table. We could do that by adding a new column in pg_constraint like 'connoinh' or something, but I guess we would prefer not to get

Re: [HACKERS] Check constraints on partition parents only?

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 9:43 AM, Nikhil Sontakke nikhil.sonta...@enterprisedb.com wrote: Alternatively we could bring about the same by using a combination of conislocal and coninhcnt. For ONLY constraints, we will need to percolate this information down to the point where we define it in the

Re: [HACKERS] Check constraints on partition parents only?

2011-07-28 Thread Nikhil Sontakke
This approach certainly can't work, because a table can be both an inheritance parent and an inheritance child. It could have an ONLY constraint, and also inherit a copy of the same constraint for one or more parents. IOW, the fact that conislocal = true does not mean that coninhcount is

Re: [HACKERS] sinval synchronization considered harmful

2011-07-28 Thread Robert Haas
On Wed, Jul 27, 2011 at 2:29 PM, Robert Haas robertmh...@gmail.com wrote: The reason the benefit is smaller is, I believe, because the previous numbers were generated with the lazy vxid locks patch applied, and these were generated against master.  With the lock manager as a bottleneck, the

Re: [HACKERS] patch: move dumpUserConfig call in dumpRoles function of pg_dumpall.c

2011-07-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Jul 27, 2011 at 7:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think pg_dumpall is the very least of your problems if you do something like that.  We probably ought to forbid it entirely. Well, we had a long discussion of that on the thread

Re: [HACKERS] Check constraints on partition parents only?

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 10:01 AM, Nikhil Sontakke nikhil.sonta...@enterprisedb.com wrote: Yeah, in your case too an initdb would be required, so might as well go down the route of a new column. Any preferences for the name? connoinh conisonly constatic or confixed I'd probably pick conisonly

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 09:38 -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 6:50 AM, Hannu Krosing ha...@2ndquadrant.com wrote: On Wed, Oct 20, 2010 at 10:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether we could do something involving WAL properties --- the current tuple

Re: [HACKERS] New partitioning WAS: Check constraints on partition parents only?

2011-07-28 Thread Robert Haas
On Tue, Jul 26, 2011 at 7:58 PM, Josh Berkus j...@agliodbs.com wrote: Jim, That's why I'd be opposed to any partitioning scheme that removed the ability to have different fields in different children. We've found that ability to be very useful. Likewise, I think we need to have intelligent

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 10:17 AM, Hannu Krosing ha...@2ndquadrant.com wrote: My hope was, that this contention would be the same than simply writing the WAL buffers currently, and thus largely hidden by the current WAL writing sync mechanisma. It really covers just the part which writes

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Jul 28, 2011 at 10:17 AM, Hannu Krosing ha...@2ndquadrant.com wrote: My hope was, that this contention would be the same than simply writing the WAL buffers currently, and thus largely hidden by the current WAL writing sync mechanisma. It

[HACKERS] Netbeans and postgres

2011-07-28 Thread pasman pasmański
Hi. I install netbeans 7. When i try to configure postgresql project, path is set up incorectly - gcc not found How to set the path ? -- pasman -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 10:23 -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 10:17 AM, Hannu Krosing ha...@2ndquadrant.com wrote: My hope was, that this contention would be the same than simply writing the WAL buffers currently, and thus largely hidden by the current WAL writing sync

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Tom Lane
Hannu Krosing ha...@2ndquadrant.com writes: On Thu, 2011-07-28 at 10:23 -0400, Robert Haas wrote: I'm confused by this, because I don't think any of this can be done when we insert the commit record into the WAL stream. The update to stored snapshot needs to happen at the moment when the WAL

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 10:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Jul 28, 2011 at 10:17 AM, Hannu Krosing ha...@2ndquadrant.com wrote: My hope was, that this contention would be the same than simply writing the WAL buffers currently, and

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 10:45 -0400, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: On Thu, 2011-07-28 at 10:23 -0400, Robert Haas wrote: I'm confused by this, because I don't think any of this can be done when we insert the commit record into the WAL stream. The update to

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 11:10 AM, Hannu Krosing ha...@2ndquadrant.com wrote: My main point was, that we already do synchronization when writing wal, why not piggyback on this to also update latest snapshot . Well, one problem is that it would break sync rep. Another problem is that pretty much

Re: [HACKERS] psql: bogus descriptions displayed by \d+

2011-07-28 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Peter Eisentraut pete...@gmx.net wrote: I would like to argue for reverting this. If you want to word-smith details like this, relation doesn't carry any additional meaning. PG hackers know that internally, a relation is a table, view, index,

Re: [HACKERS] Netbeans and postgres

2011-07-28 Thread Peter Geoghegan
2011/7/28 pasman pasmański pasma...@gmail.com: I install netbeans 7. When i try to configure postgresql project, path is set up incorectly - gcc not found How to set the path ? Install GCC? -- Peter Geoghegan       http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 17:10 +0200, Hannu Krosing wrote: On Thu, 2011-07-28 at 10:45 -0400, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: On Thu, 2011-07-28 at 10:23 -0400, Robert Haas wrote: I'm confused by this, because I don't think any of this can be done when we

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 11:15 -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 11:10 AM, Hannu Krosing ha...@2ndquadrant.com wrote: My main point was, that we already do synchronization when writing wal, why not piggyback on this to also update latest snapshot . Well, one problem is that it

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Jul 28, 2011 at 10:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: But should we rethink that? Your point that hot standby transactions on a slave could see snapshots that were impossible on the parent was disturbing. Should we look for a way to

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Wed, 2011-07-27 at 22:51 -0400, Robert Haas wrote: On Wed, Oct 20, 2010 at 10:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether we could do something involving WAL properties --- the current tuple visibility logic was designed before WAL existed, so it's not exploiting that

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 11:57 -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Jul 28, 2011 at 10:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: But should we rethink that? Your point that hot standby transactions on a slave could see snapshots that were impossible on the

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 18:05 +0200, Hannu Krosing wrote: But it is also possible, that you can get logically consistent snapshots by protecting only some ops. for example, if you protect only insert and get snapshot, then the worst that can happen is that you get a snapshot that is a few

Re: [HACKERS] New partitioning WAS: Check constraints on partition parents only?

2011-07-28 Thread Josh Berkus
Robert, If the value is less than v1, put it in a partition called p1. If the value is less than v2, put it in a position called p2. repeat ad nauseum, and then, optionally: If the value is not less than any of the above, put it in a partition called poverflow. I like that design, not

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 18:48 +0200, Hannu Krosing wrote: On Thu, 2011-07-28 at 18:05 +0200, Hannu Krosing wrote: But it is also possible, that you can get logically consistent snapshots by protecting only some ops. for example, if you protect only insert and get snapshot, then the worst

Re: [HACKERS] New partitioning WAS: Check constraints on partition parents only?

2011-07-28 Thread Aidan Van Dyk
On Thu, Jul 28, 2011 at 12:53 PM, Josh Berkus j...@agliodbs.com wrote: Robert, If the value is less than v1, put it in a partition called p1. If the value is less than v2, put it in a position called p2. repeat ad nauseum, and then, optionally: If the value is not less than any of the above,

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 11:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Jul 28, 2011 at 10:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: But should we rethink that?  Your point that hot standby transactions on a slave could see snapshots that were

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 11:36 AM, Hannu Krosing ha...@krosing.net wrote: On Thu, 2011-07-28 at 11:15 -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 11:10 AM, Hannu Krosing ha...@2ndquadrant.com wrote: My main point was, that we already do synchronization when writing wal, why not

Re: [HACKERS] sinval synchronization considered harmful

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 10:05 AM, Robert Haas robertmh...@gmail.com wrote: I'll also test out creating and dropping some tables. Still need to work on this one. And there results are in. I set up the following sophisticated test script for pgbench: CREATE TEMP TABLE foo (a int); DROP TABLE

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 14:27 -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 11:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Jul 28, 2011 at 10:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: But should we rethink that? Your point that hot standby

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Tom Lane
Hannu Krosing ha...@krosing.net writes: So the basic design could be a sparse snapshot, consisting of 'xmin, xmax, running_txids[numbackends] where each backend manages its own slot in running_txids - sets a txid when aquiring one and nulls it at commit, possibly advancing xmin if

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 21:32 +0200, Hannu Krosing wrote: On Thu, 2011-07-28 at 14:27 -0400, Robert Haas wrote: Hmm, interesting idea. However, consider the scenario where some transactions are using synchronous_commit or synchronous replication, and others are not. If a transaction that

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Tom Lane
Hannu Krosing ha...@2ndquadrant.com writes: On Thu, 2011-07-28 at 14:27 -0400, Robert Haas wrote: We can't make either transaction visible without making both visible, and we certainly can't acknowledge the second transaction to the client until we've made it visible. I'm not going to say

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 15:42 -0400, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: On Thu, 2011-07-28 at 14:27 -0400, Robert Haas wrote: We can't make either transaction visible without making both visible, and we certainly can't acknowledge the second transaction to the

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 15:38 -0400, Tom Lane wrote: Hannu Krosing ha...@krosing.net writes: So the basic design could be a sparse snapshot, consisting of 'xmin, xmax, running_txids[numbackends] where each backend manages its own slot in running_txids - sets a txid when aquiring one and nulls

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Kevin Grittner
Hannu Krosing ha...@2ndquadrant.com wrote: but I still think that it is right semantics to make your commit visible to others, even before you have gotten back the confirmation yourself. Possibly. That combined with building snapshots based on the order of WAL entries of commit records

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 3:32 PM, Hannu Krosing ha...@2ndquadrant.com wrote: Hmm, interesting idea.  However, consider the scenario where some transactions are using synchronous_commit or synchronous replication, and others are not.  If a transaction that needs to wait (either just for WAL

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 3:40 PM, Hannu Krosing ha...@2ndquadrant.com wrote: On Thu, 2011-07-28 at 21:32 +0200, Hannu Krosing wrote: On Thu, 2011-07-28 at 14:27 -0400, Robert Haas wrote: Hmm, interesting idea.  However, consider the scenario where some transactions are using

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 4:12 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Hannu Krosing ha...@2ndquadrant.com wrote: but I still think that it is right semantics to make your commit visible to others, even before you have gotten back the confirmation yourself. Possibly. That

Re: [HACKERS] New partitioning WAS: Check constraints on partition parents only?

2011-07-28 Thread Martijn van Oosterhout
On Thu, Jul 28, 2011 at 10:20:57AM -0400, Robert Haas wrote: What Itagaki Takahiro proposed a year ago was basically something where you would say, OK, I want to partition on this column (or maybe expression). And then you say: If the value is less than v1, put it in a partition called p1.

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 16:20 -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 3:40 PM, Hannu Krosing ha...@2ndquadrant.com wrote: On Thu, 2011-07-28 at 21:32 +0200, Hannu Krosing wrote: On Thu, 2011-07-28 at 14:27 -0400, Robert Haas wrote: Hmm, interesting idea. However, consider the

Re: [HACKERS] New partitioning WAS: Check constraints on partition parents only?

2011-07-28 Thread Tom Lane
Aidan Van Dyk ai...@highrise.ca writes: On Thu, Jul 28, 2011 at 12:53 PM, Josh Berkus j...@agliodbs.com wrote: Second, the key-based partitioning I described would actually be preferred to what you describe by a lot of users I know, because it's even simpler than what you propose, which means

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 4:36 PM, Hannu Krosing ha...@krosing.net wrote: so in case of stuck slave the syncrep transcation is committed after crash, but is not committed before the crash happens ? Yep. ow will the replay process get stuc gaian during recovery ? Nope. -- Robert Haas

Re: [HACKERS] XMLATTRIBUTES vs. values of type XML

2011-07-28 Thread Peter Eisentraut
On ons, 2011-07-27 at 23:21 +0200, Florian Pflug wrote: On Jul27, 2011, at 23:08 , Peter Eisentraut wrote: Well, offhand I would expect that passing an XML value to XMLATTRIBUTES would behave as in SELECT XMLELEMENT(NAME t, XMLATTRIBUTES(XMLSERIALIZE(content 'amp;'::XML AS text) AS

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Having transactions become visible in the same order on the master and the standby is very appealing, but I'm pretty well convinced that allowing commits to become visible before they've been durably committed is throwing the D an ACID out the window.

Re: [HACKERS] WIP: Fast GiST index build

2011-07-28 Thread Alexander Korotkov
On Tue, Jul 26, 2011 at 9:24 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Let me know if you have questions on the approach taken. I realized that approach which comes as replace to loaded-subtrees keeping is unclear to me. We save paths between node buffers. But those

Re: [HACKERS] WIP: Fast GiST index build

2011-07-28 Thread Heikki Linnakangas
On 28.07.2011 23:57, Alexander Korotkov wrote: On Tue, Jul 26, 2011 at 9:24 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Let me know if you have questions on the approach taken. I realized that approach which comes as replace to loaded-subtrees keeping is unclear to

Re: [HACKERS] error: could not find pg_class tuple for index 2662

2011-07-28 Thread daveg
On Thu, Jul 28, 2011 at 09:46:41AM -0400, Robert Haas wrote: On Wed, Jul 27, 2011 at 8:28 PM, daveg da...@sonic.net wrote: My client has been seeing regular instances of the following sort of problem: On what version of PostgreSQL? 9.0.4. I previously said: This occurs on postgresql

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Jeff Davis
On Thu, 2011-07-28 at 14:27 -0400, Robert Haas wrote: Right, but if the visibility order were *defined* as the order in which commit records appear in WAL, that problem neatly goes away. It's only because we have the implementation artifact that set my xid to 0 in the ProcArray is

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Kevin Grittner
Jeff Davis pg...@j-davis.com wrote: Wouldn't the same issue exist if one transaction is waiting for sync rep (synchronous_commit=on), and another is waiting for just a WAL flush (synchronous_commit=local)? I don't think that a synchronous_commit=off is required. I think you're right --

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Kevin Grittner
Kevin Grittner kevin.gritt...@wicourts.gov wrote: to make visibility atomic with commit I meant: to make visibility atomic with WAL-write of the commit record -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] WIP: Fast GiST index build

2011-07-28 Thread Alexander Korotkov
On Fri, Jul 29, 2011 at 1:10 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: gistFindCorrectParent() should take care of that. OK, now it seems that I understood. I need to verify amount memory needed for paths because it seems that they tends to accumulate. Also I need to

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread karavelov
- Цитат от Hannu Krosing (ha...@2ndquadrant.com), на 28.07.2011 в 22:40 - Maybe this is why other databases don't offer per backend async commit ? Isn't Oracle's COMMIT WRITE NOWAIT; basically the same - ad hoc async commit? Though their idea of backend do not maps exactly to

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 4:54 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: Having transactions become visible in the same order on the master and the standby is very appealing, but I'm pretty well convinced that allowing commits to become

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Hannu Krosing
On Thu, 2011-07-28 at 16:42 -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 4:36 PM, Hannu Krosing ha...@krosing.net wrote: so in case of stuck slave the syncrep transcation is committed after crash, but is not committed before the crash happens ? Yep. ow will the replay process get

Re: [HACKERS] error: could not find pg_class tuple for index 2662

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 5:46 PM, daveg da...@sonic.net wrote: On Thu, Jul 28, 2011 at 09:46:41AM -0400, Robert Haas wrote: On Wed, Jul 27, 2011 at 8:28 PM, daveg da...@sonic.net wrote: My client has been seeing regular instances of the following sort of problem: On what version of

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Ants Aasma
On Thu, Jul 28, 2011 at 11:54 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: (4)  We communicate acceptable snapshots to the replica to make the order of visibility visibility match the master even when that doesn't match the order that transactions returned from commit. I wonder if

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Ants Aasma
On Fri, Jul 29, 2011 at 2:20 AM, Robert Haas robertmh...@gmail.com wrote: Well, again, there are three levels: (A) synchronous_commit=off.  No waiting! (B) synchronous_commit=local transactions, and synchronous_commit=on transactions when sync rep is not in use.  Wait for xlog flush. (C)

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 7:54 PM, Ants Aasma ants.aa...@eesti.ee wrote: On Thu, Jul 28, 2011 at 11:54 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: (4)  We communicate acceptable snapshots to the replica to make the order of visibility visibility match the master even when that doesn't

Re: [HACKERS] cheaper snapshots

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 8:12 PM, Ants Aasma ants.aa...@eesti.ee wrote: On Fri, Jul 29, 2011 at 2:20 AM, Robert Haas robertmh...@gmail.com wrote: Well, again, there are three levels: (A) synchronous_commit=off.  No waiting! (B) synchronous_commit=local transactions, and synchronous_commit=on

Re: [HACKERS] sinval synchronization considered harmful

2011-07-28 Thread Noah Misch
On Thu, Jul 28, 2011 at 03:03:05PM -0400, Robert Haas wrote: On Thu, Jul 28, 2011 at 10:05 AM, Robert Haas robertmh...@gmail.com wrote: I'll also test out creating and dropping some tables. Still need to work on this one. And there results are in. I set up the following sophisticated

Re: [HACKERS] sinval synchronization considered harmful

2011-07-28 Thread Robert Haas
On Thu, Jul 28, 2011 at 11:05 PM, Noah Misch n...@2ndquadrant.com wrote: The comparison I had in mind was (a) master + lazy-vxid + [1]sinval-fastpath vs. (b) master + lazy-vxid + [2]sinval-hasmessages.  The only claimed benefit of [2] over [1], as far as I can see, is invulnerability to the