From: | Shane Ambler <pgsql(at)Sheeky(dot)Biz> |
---|---|
To: | M2Y <mailtoyahoo(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Some newbie questions |
Date: | 2008-09-07 18:52:14 |
Message-ID: | 48C422DE.4060801@Sheeky.Biz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
M2Y wrote:
> Hello,
>
> Could you plz answer the following questions of a newbie:
>
> What is a good way to start understanding backend(postgres) code? Is
> there any documentation available especially for developers?
Most of the developer info is within comments in the code itself.
Another place to start is http://www.postgresql.org/developer/coding
> What is commit log and why it is needed?
To achieve ACID (Atomic, Consistent, Isolatable, Durable)
The changes needed to complete a transaction are saved to the commit log
and flushed to disk, then the data files are changed. If the power goes
out during the data file modifications the commit log can be used to
complete the changes without losing any data.
> Why does a replication solution need log shipping and why cant we
> just ship the transaction statements to a standby node?
Depends on what you wish to achieve. They are two ways to a similar
solution.
Log shipping is part of the core code with plans to make the duplicate
server be able to satisfy select queries.
Statement based replication is offered by other options such as slony.
Each has advantages and disadvantages. Transaction logs are part of
normal operation and can be copied to another server in the background
without adding load or delays to the master server.
Statement based replication has added complexity of waiting for the
slaves to duplicate the transaction and handling errors from a slave
applying the transaction. They also tend to have restrictions when it
comes to replicating DDL changes - implemented as triggers run from
INSERT/UPDATE not from CREATE/ALTER TABLE.
--
Shane Ambler
pgSQL (at) Sheeky (dot) Biz
Get Sheeky @ http://Sheeky.Biz
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2008-09-07 18:52:40 | Re: Proposed patch: make pg_dump --data-only consider FK constraints |
Previous Message | Heikki Linnakangas | 2008-09-07 18:50:56 | Re: Proposed patch: make pg_dump --data-only consider FK constraints |