473,799 Members | 3,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about the Internals

I'm a consultant for a large company and they are looking at a database to
use.

I made the suggestion about going with Postgresql.

I told him about it's MVCC design, he liked that ideal, but wanted to know
exactly HOW did it handle the multiple versions of records. He's concerned
because he was burn very early on by another database that was MVCC (won't
mention any names) and his system became corrupt. That database has since
improved and fixed all of their problems.

But the question is, how does Postgresql handle the multiple versions?
How does it handle the records BEFORE they are committed and how does it
handle the records AFTER they are committed that allows different users to
possible have a different view of the data and indexes. And also how does
the transactional part of the system place a role?

Any help here would be great appreciated!

Thanks

Nov 12 '05 #1
2 1467
Relaxin wrote:
I'm a consultant for a large company and they are looking at a database to
use.

I made the suggestion about going with Postgresql.

I told him about it's MVCC design, he liked that ideal, but wanted to know
exactly HOW did it handle the multiple versions of records. He's concerned
because he was burn very early on by another database that was MVCC (won't
mention any names) and his system became corrupt. That database has since
improved and fixed all of their problems.

But the question is, how does Postgresql handle the multiple versions?
How does it handle the records BEFORE they are committed and how does it
handle the records AFTER they are committed that allows different users to
possible have a different view of the data and indexes. And also how does
the transactional part of the system place a role?


Each record has a transction id of creation and an expire transaction
id. When you add a record, you put your xid on the old record and
create a new one. No one has reported any corruption problems with our
database for a long time, so you should be fine.

If you want details, see the developers web page and see my internals
presentation --- it has a diagram showing old/new rows and their
visibility to a single transaction.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.ph a.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2
On Sun, Oct 26, 2003 at 02:42:27PM -0800, Relaxin wrote:
But the question is, how does Postgresql handle the multiple versions?


On the developers site, there is an MVCC internals presentation.
Have a look at it -- even I (think I) understand it.

A
--
----
Andrew Sullivan 204-4141 Yonge Street
Afilias Canada Toronto, Ontario Canada
<an****@liberty rms.info> M2P 2A8
+1 416 646 3304 x110
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
1710
by: regisser | last post by:
I have a quastion for the C++ professionals and members of the C++ standartization commetee. As i know C++ standart requires an allocator to be a templated parameter in every STL container. Besides that one can pass reference to allocatior into every STL container. This raises the following questions: 1. Containers that were templatized with different allocators are considered different types and thus cannot be assigned to each other....
5
1693
by: ma740988 | last post by:
I sat through - what should have been a 10 minute discussion where at issue is the 'security of a class'. Truth is I was puzzled by the soruce, so much so that I lost track of the end result. In any event, consider #include <iostream> using namespace std; class Agent {
4
1990
by: Ian Giblin | last post by:
I am an experienced C programmer, learning C++ by writinging a mathematical toolkit in the framework of a script interpreter. I am posting here to ask for advice (or references) on the object design and implimentation. Currently I have a portable "ScriptSession" class which contains the mechanics of looping with a user prompt, parsing a sentence and handling syntax errors, etc., and I wan this to be a class I can use for any script...
7
1768
by: ej | last post by:
I'm trying to figure out how to get at some of the internal interpreter state for exception handlers and debug statements in general. I just read through Section 8 of the Python Tutorial. I see how to catch an exception, and specify an optional argument to get ahold of the exception itself. For example: try: {} except Exception, x: print "class of x =", x.__class__
4
2814
by: Niklaus | last post by:
Hi, I would like to know more about casts.What exactly happens when casts are applied to a variable.I know that if an object of type int is applied an cast of float the result would be of type float. 1) What i would like to know is the about the internals when a cast is applied ? Say we have
5
1465
by: Support | last post by:
Hello: I have the following code that currently needs to go in every page. QUESTION 1) Can Page_Preinit go somewhere else more global like Global.asax so that I dont have to copy this code in every page QUESTION 2) How can I externalize this code, ie, can I create a class ?... some external code that would be located in one location only for ease of maintenance that each page could call ? IF so, please describe in detail.
1
1694
by: Jobs Gooogle | last post by:
Skills: .Net VC++ Java C++ Windows Internals Unix Internals Location: Bangalore, Hyderabad, Delhi (NCR), Chennai Experience: 3+ Yrs Hand-On Please forward your profiles to mailto: jobsgooogle@gmail.com Consultant Jobs Gooogle (Nick Name)
40
1965
by: brad | last post by:
Will len(a_string) become a_string.len()? I was just reading http://docs.python.org/dev/3.0/whatsnew/3.0.html One of the criticisms of Python compared to other OO languages is that it isn't OO enough or as OO as others or that it is inconsistent. And little things such as this seem to support those arguments. Not that it matters really... just seems that classes with methods used in a more consistent manner would be more appropriate in...
2
1443
by: ambarish.mitra | last post by:
#include <iostream> class base { public: virtual void f() {} }; class derived: public virtual base { }; int main()
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10491
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10247
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9079
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.