Re: Understanding PostgreSQL Storage Engines

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Understanding PostgreSQL Storage Engines
Date: 2010-10-13 13:21:33
Message-ID: AANLkTin+F-bbV_PaAMpiX4HpNW8o+QMUH1R8A-PWm-zU@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 8, 2010 at 5:30 PM, Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com> wrote:
> I know that MySQL uses MyISAM storage engine by default and was just
> trying to look on Google to try and see if I could understand what
> storage engine does PostgreSQL use by default when I generate a
> database / table. Is there some way someone (me) who knows nothing
> about how a ORDBMS works understand the difference between all storage
> engine options and which does PostgreSQL use by default.

You could make a pretty strong case that temp tables are a different
'storage engine', since they interact differently with the storage
system. for example, they are not wal logged and this is one of the
things that makes them faster than regular tables. This illustrates a
wider philosophy of the databases in terms of features. Postgresql
went a different route than mysql.

We do expose various knobs that allow you to control specific
mechanics of how data is store in a table. For example, using table
storage parameters, you can enable/disable compression for large
datums. Many of the other things you would like do do with storage
engines, like not sync, or custom data organization, are
correspondingly exposed via the mvcc engine or the type system. It's
much cleaner conceptually (IMNSHO) to deal with these things on the
SQL level vs storage engines with their arcane tradeoffs.

There are of course some cool things we can't do that mysql can, but
the postgresql database behaves in much more regular fashion. Imagine
debugging data corruption on a third party engine -- this is a problem
we don't want.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-10-13 14:06:48 Re: Seg fault on PQconnectdb
Previous Message Igor Neyman 2010-10-13 12:50:36 Re: problem with PG install script on Windows