Re: Running Postgres Daemons with same data files

From: Jeff <threshar(at)torgo(dot)978(dot)org>
To: Bhartendu Maheshwari <bhartendum(at)jataayusoft(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Running Postgres Daemons with same data files
Date: 2003-12-11 13:39:36
Message-ID: 20031211083936.46ddb129.threshar@torgo.978.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 11 Dec 2003 18:13:07 +0530
Bhartendu Maheshwari <bhartendum(at)jataayusoft(dot)com> wrote:

> Dear matt
>
> Don't joke, this for stopping the Postgres Server. I want close the
> files in between the database operations. I am looking for some SQL
> command like in Mysql command is 'flush tables'. what's in postgres?
>
> regards
> bhartendu
>

forcing a checkpoint or using commit may get those tables flushed out.
(or at least the wal). but the problem is other postmasters on other
machines may not know that data has changed - it could be sitting in a
shared buffer.

Machine A reads block 123, stored in a shared buffer.
Machine B reads block 123, modifies it, writes it back out
Machine A needs block 123, finds it in its shared buffer and uses that
data [which is no longer valid]

Thus you can see the problems.

or another one

Machine A locks row 123 for update
Machine B also wants to lock row 123. How does it know A already has
the lock? (locks are stored in shared memory)

What you really want is multi-master replication. Currently this
doesn't exist on PG (that I know of). There's a JDBC app that simulates
it. (And you could too, to varying degrees of success).

If mysql works, then use it, but I'd be suprised if it didn't suffer a
lot of these same problems as well.

If you seriously need this feature, then you'll either have to A. buy
oracle/whatever or B. pay to fund development of it for PG

--
Jeff Trout <jeff(at)jefftrout(dot)com>
http://www.jefftrout.com/
http://www.stuarthamm.net/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-12-11 14:15:12 Re: Postrgres data restoration problem
Previous Message Sam Barnett-Cormack 2003-12-11 13:37:01 Re: Running Postgres Daemons with same data files