Re: Running Postgres Daemons with same data files

From: Sam Barnett-Cormack <s(dot)barnett-cormack(at)lancaster(dot)ac(dot)uk>
To: Matt Clark <matt(at)ymogen(dot)net>
Cc: Bhartendu Maheshwari <bhartendum(at)jataayusoft(dot)com>, Postgres Mailing List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Running Postgres Daemons with same data files
Date: 2003-12-11 13:37:01
Message-ID: Pine.LNX.4.50.0312111333580.829-100000@short.lancs.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, 11 Dec 2003, Matt Clark wrote:

> 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...

Of course, they might just get written to the WAL... the *only* way to
get the files into a consistent, safe state is to stop the server.
Sorry.

> > 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
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--

Sam Barnett-Cormack
Software Developer | Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff 2003-12-11 13:39:36 Re: Running Postgres Daemons with same data files
Previous Message Matt Clark 2003-12-11 12:58:11 Re: Running Postgres Daemons with same data files