Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Grzegorz Jaśkiewicz
On Mon, Dec 22, 2008 at 5:41 AM, Scott Marlowe scott.marl...@gmail.com wrote: I think one of the points that proves this is the chunks of innovative code that have been put into postgresql that were basically written by one or two guys in 1 year. Small sharp teams can tackle one particular

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Geoffrey
Jonah H. Harris wrote: On Sun, Dec 21, 2008 at 11:02 PM, Scott Marlowe scott.marl...@gmail.com wrote: The difference is HE put forth an opinion about the pg developers being smarter, but you put forth what seems like a statement of fact with no evidence to back it up. One is quite subjective

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 7:37 AM, Geoffrey li...@serioustechnology.com wrote: I still haven't seen a post regarding the Oracle scalability issue. Where is the data?? You mean the PG scalability issue in comparison to Oracle? -- Jonah H. Harris, Senior DBA myYearbook.com -- Sent via

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Alvaro Herrera
Scott Marlowe escribió: The difference is HE put forth an opinion about the pg developers being smarter, but you put forth what seems like a statement of fact with no evidence to back it up. The other difference is that I said it jokingly, whereas you (Jonah) seem to be bitter about the whole

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 8:22 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: The other difference is that I said it jokingly, whereas you (Jonah) seem to be bitter about the whole matter. Well, it wasn't clear and I was just in a generally bad mood. Usually you'd add a :) at the end,

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread James B. Byrne
In-Reply-to: 200812220435.mbm4zmd07...@momjian.us On: Sun, 21 Dec 2008 23:35:48 -0500 (EST), Bruce Momjian br...@momjian.us wrote: I am sure there are smart people at all the database companies. I do believe that open source development harnesses the abilities of its intelligent people

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 9:35 AM, James B. Byrne byrn...@harte-lyne.ca wrote: I think that to describe either OS or commercial software as better or worse is misleading. The most that can be said is that each approach serves a different purpose and exists in a different environment. Well said.

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Geoffrey
Jonah H. Harris wrote: On Mon, Dec 22, 2008 at 7:37 AM, Geoffrey li...@serioustechnology.com wrote: I still haven't seen a post regarding the Oracle scalability issue. Where is the data?? You mean the PG scalability issue in comparison to Oracle? Yes. -- Until later, Geoffrey Those who

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Christophe
Playing the straight man, I have to ask: Scalability issues with locks in PG vs Oracle? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Jonah H. Harris
On Mon, Dec 22, 2008 at 12:34 PM, Christophe x...@thebuild.com wrote: Playing the straight man, I have to ask: Scalability issues with locks in PG vs Oracle? (in slow motion) no. Locks aren't something particular I'd like to discuss, this topic just came from a post upthread. --

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Jonah H. Harris
On Fri, Dec 19, 2008 at 7:49 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Oracle on the other hand stores the lock information directly in the data block that is locked, thus the number of locks does not affect system performance (in terms of managing them). I couldn't find any

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread David Fetter
On Sun, Dec 21, 2008 at 08:46:15PM -0500, Jonah H. Harris wrote: On Fri, Dec 19, 2008 at 7:49 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Oracle on the other hand stores the lock information directly in the data block that is locked, thus the number of locks does not affect system

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Jonah H. Harris
On Sun, Dec 21, 2008 at 9:42 PM, David Fetter da...@fetter.org wrote: On Sun, Dec 21, 2008 at 08:46:15PM -0500, Jonah H. Harris wrote: On Fri, Dec 19, 2008 at 7:49 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Oracle on the other hand stores the lock information directly in the data

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Scott Marlowe
On Sun, Dec 21, 2008 at 8:48 PM, Jonah H. Harris jonah.har...@gmail.com wrote: On Sun, Dec 21, 2008 at 9:42 PM, David Fetter da...@fetter.org wrote: On Sun, Dec 21, 2008 at 08:46:15PM -0500, Jonah H. Harris wrote: On Fri, Dec 19, 2008 at 7:49 AM, Alvaro Herrera alvhe...@commandprompt.com

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Scott Marlowe
Having dealt with cust service for a few commercial dbs, I can safely say I get way better service from way smarter people when I have a problem. And I don't have a lot of problems. Clarificiation: That's saying I get better service and such from pg users / developers than anywhere else. --

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Jonah H. Harris
On Sun, Dec 21, 2008 at 11:04 PM, Scott Marlowe scott.marl...@gmail.com wrote: Having dealt with cust service for a few commercial dbs, I can safely say I get way better service from way smarter people when I have a problem. And I don't have a lot of problems. Clarificiation: That's saying

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Jonah H. Harris
On Sun, Dec 21, 2008 at 11:02 PM, Scott Marlowe scott.marl...@gmail.com wrote: The difference is HE put forth an opinion about the pg developers being smarter, but you put forth what seems like a statement of fact with no evidence to back it up. One is quite subjective and open for debate on

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Bruce Momjian
Jonah H. Harris wrote: On Sun, Dec 21, 2008 at 11:02 PM, Scott Marlowe scott.marl...@gmail.com wrote: The difference is HE put forth an opinion about the pg developers being smarter, but you put forth what seems like a statement of fact with no evidence to back it up. One is quite

Re: [GENERAL] How are locks managed in PG?

2008-12-21 Thread Scott Marlowe
On Sun, Dec 21, 2008 at 9:35 PM, Bruce Momjian br...@momjian.us wrote: Jonah H. Harris wrote: On Sun, Dec 21, 2008 at 11:02 PM, Scott Marlowe scott.marl...@gmail.com wrote: The difference is HE put forth an opinion about the pg developers being smarter, but you put forth what seems like a

[GENERAL] How are locks managed in PG?

2008-12-19 Thread Thomas Kellerer
Hi, I have a question on how PG manages lock information. Does this go through a central lock manager that manages the information which row is locked by which transactioni. Or is the lock information stored directly within the data blocks (so no central data structure would be needed)

Re: [GENERAL] How are locks managed in PG?

2008-12-19 Thread Allan Kamau
Postgres by default uses the MVCC (Multiversion Concurrency Control, MVCC) for concurrency control. This is a large topic and may require more explanation than a simple email response would easily provide. The well written PostgreSQL documentation has good explanation on this topic

Re: [GENERAL] How are locks managed in PG?

2008-12-19 Thread Thomas Kellerer
Thanks for the answer. I know the concept of MVCC (and the chapter in the manual) and how locks are applied in PG. What I would like to know how a lock (if it is acquired e.g. by doing an update) is technically managed inside PG. Basically there are two solutions: a lock manager that stores

Re: [GENERAL] How are locks managed in PG?

2008-12-19 Thread Alvaro Herrera
Thomas Kellerer wrote: Basically there are two solutions: a lock manager that stores a map for each item locked and the corresponding lock. This solution doesn't scale well, because the management overhead is linear to the number of locks. This is one of the reasons why one should avoid locks

Re: [GENERAL] How are locks managed in PG?

2008-12-19 Thread Thomas Kellerer
Alvaro Herrera, 19.12.2008 13:49: We use an in-memory lock manager for table- and page-level locks. For shared tuple locks, they are spilled to disk on an ad-hoc storage system (pg_multixact) when there is more than one shared locker. (Exclusive locks and single locker shared locks are stored