Обсуждение: [REPOST] Remote database questions (NFS shared access, RServ)

Поиск
Список
Период
Сортировка

[REPOST] Remote database questions (NFS shared access, RServ)

От
Steve Frampton
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello:

Reposting this due to no responses.  Does anybody have any experience with
these issues?  ;-(

I am constructing a billing system using PostgreSQL, ODBC, and C++.  I
have a primary database set up on a beefy server which is fed 24/7 by a
transaction feeder, and is also used for processing the billing.

I have a 2nd server which is being used as a hot backup server, which is
also being fed by the transaction feeder.  However, billing processing
does not run through the feeder, so I find myself doing a daily dump on
the appropriate tables on the production server, deleting the old data
from the backup, and importing with copy from.  Needless to say, RServ
would be a better solution for this.  I'm not sure how I would set up
RServ to access a remote database, however.  Is this possible?

Also, I would like to provide the ability for users to look up their
billing data via a CGI interface, which would perform queries to yet
another server, to be set up for R/O access only (for performance, and
security).  I was thinking of using RServ for this purpose as well, but an
even better solution seems to be to run my production (or backup mirror)
from a NetApp over Gb NFS so there's no issues with replication.  Is it
possible, safe, and advisable to share a PostgreSQL database file via NFS,
as long as non-masters are only accessing it R/O?

Thank you in advance for your advice.

- ---------------< LINUX: The choice of a GNU generation. >-------------
Steve Frampton   <frampton@LinuxNinja.com>   http://www.LinuxNinja.com
GNU Privacy Guard ID: D055EBC5  (see http://www.gnupg.org for details)
GNU-PG Fingerprint: EEFB F03D 29B6 07E8 AF73  EF6A 9A72 F1F5 D055 EBC5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7wq7cmnLx9dBV68URAruLAKCJdhc7l1E9Tphha/5fxWZp0QDyfwCgiugt
mg5KBHCdrqEyT+MY14it1fU=
=YWmp
-----END PGP SIGNATURE-----


Re: [REPOST] Remote database questions (NFS shared access, RServ)

От
Tom Lane
Дата:
Steve Frampton <frampton@LinuxNinja.com> writes:
> even better solution seems to be to run my production (or backup mirror)
> from a NetApp over Gb NFS so there's no issues with replication.  Is it
> possible, safe, and advisable to share a PostgreSQL database file via NFS,
> as long as non-masters are only accessing it R/O?

No.  (a) there is no such thing as R/O access in Postgres; (b) the
non-masters would have no guarantee of seeing a consistent view,
due to buffering inside the master.

I don't even recommend mounting a database over NFS, let alone trying
to share it.  Too much risk of database corruption after a system crash,
because NFS provides only weak guarantees about write synchronization.
See the mailing list archives for past discussion about NFS risks.

            regards, tom lane

Re: [REPOST] Remote database questions (NFS shared access, RServ)

От
"Chris Ruprecht"
Дата:
Sharing a DB via NFS - No - absolutely not a good idea, no matter which DB
you're talking about.

However, you can remote access the DB through TCP/IP sockets, the Postmaster
can be configured to listen to some port (5432 is the default) and you can
have remote sessions running.
To R/O access a PostGreSQL DB, you can grant 'select' rights to the remote
users. It's not the same as opening the DB via a local postmaster process on
a remote drive though - refer to my first point ;).

Best regards,
Chris


----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Steve Frampton" <frampton@linuxninja.com>
Cc: <pgsql-admin@postgresql.org>
Sent: Tuesday, October 09, 2001 8:32 AM
Subject: Re: [ADMIN] [REPOST] Remote database questions (NFS shared access,
RServ)


> Steve Frampton <frampton@LinuxNinja.com> writes:
> > even better solution seems to be to run my production (or backup mirror)
> > from a NetApp over Gb NFS so there's no issues with replication.  Is it
> > possible, safe, and advisable to share a PostgreSQL database file via
NFS,
> > as long as non-masters are only accessing it R/O?
>
> No.  (a) there is no such thing as R/O access in Postgres; (b) the
> non-masters would have no guarantee of seeing a consistent view,
> due to buffering inside the master.
>
> I don't even recommend mounting a database over NFS, let alone trying
> to share it.  Too much risk of database corruption after a system crash,
> because NFS provides only weak guarantees about write synchronization.
> See the mailing list archives for past discussion about NFS risks.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com