From: Matt Clark <matt@ymogen.net>
To: Bhartendu Maheshwari <bhartendum@jataayusoft.com>
To: Postgres Mailing List <pgsql-admin@postgresql.org>
Subject: Re: Running Postgres Daemons with same data files
Date: Thu, 11 Dec 2003 12:58:11 -0000
Message-ID: <OAEAKHEHCMLBLIDGAFELAEJCEEAA.matt@ymogen.net> (raw)
In-Reply-To: <1071146588.1211.2.camel@bharat>
Well I wasn't joking.
If you want to get the files on disk into a state where they can be modified by a different postmaster, then you need to shut the
current postmaster down. In theory, maybe, if you only want the second postmaster to have read access, then you could disconnect
all users from the current postmaster and stop accepting any more connections, but I wouldn't do it if I were you.
Maybe I'm missing the point. The only other answer is:
commit;
Because for postgres commit *means* commit the transaction to disk. Of course if you're using a NAS then who knows whether the
files have _really_ been written to disk after an fsync. Postgres just has to believe what the operating system tells it...
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
>
> On Thu, 2003-12-11 at 16:56, Matt Clark wrote:
> > > I got all your points, thanks for such a great discussion, Now the last
> > > thing I want is how can I close the data files and flush the cache into
> > > the data files. How can I do this in postgresql????
> >
> > pg_ctl stop
> >
> >
> >
> >
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: matt@ymogen.net, bhartendum@jataayusoft.com
Subject: Re: Running Postgres Daemons with same data files
In-Reply-To: <OAEAKHEHCMLBLIDGAFELAEJCEEAA.matt@ymogen.net>
References: <1071146588.1211.2.camel@bharat> <OAEAKHEHCMLBLIDGAFELAEJCEEAA.matt@ymogen.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox