Re: Questions about server.

From: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>
To: "Daniel T(dot) Staal" <DStaal(at)usa(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Questions about server.
Date: 2005-12-21 20:34:52
Message-ID: 43A9BC6C.9020409@ca.afilias.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Daniel T. Staal wrote:

>On Tue, December 20, 2005 9:46 pm, max chin said:
>
>
>>1.) What I knew is when too many users access a database at the same
>>time, it will slow down database server process. My question is how to
>>make database server process more faster even if a lot of users access
>>information in database at the same time? What kind of technology is
>>needed to help database server process more faster ?
>>
>>
>
>More RAM, and faster hard drives top the list. A good CPU is nice, but
>bump RAM and hard drives first.
>
>(Which would make more difference depends on your situation.)
>
>
Proper database and application design can have a huge impact as well.
If you end up with lock contention issues, all the hardware in the world
won't help.

>
>
>>2.) In my company, database server and web server are store inside a
>>machine. My question is how to separate database server and web server
>>from one machine to two machine? I mean how those 2 server within one
>>machine will be separated become 1 server within one machine, another
>>server within one another machine. Can you show me the way or process of
>>implementation?
>>
>>
>
>I'll let someone else answer this, but it is fairly simple in theory.
>Depending on your setup, it may only be a single configuration setting.
>
>Of course, that means it depends a lot on what processes are doing the
>communication, and how they are configured.
>
>
Put the webserver and associated files on one server, the database
binaries and your data directory on the other. In your postgresql.conf
file, make sure that TCP/IP connections are on, and in your pg_hba.conf
file, make sure that you are allowing access from the machine that has
the webserver on it.

Then reconfigure the web app to connect remotely instead of locally.
How to this is also quite simple in theroy. Where ever you have a
database connection, tell it to connect to the remote server, instead of
the local one. How you do this will depend entirely on your web app.

>
>
>>3.) How to back up automatically database information from host machine
>>to another machine every one hour and everytime update database
>>informations is done?
>>
>>
>
>There are various ways to do this. You could do a regular pg_dump on a
>cron schedule. You could use triggers with pgsql to automatically update
>a concurrent database. You could build a distributed database, in a
>master/slave configuration. Your best choice depends on your needs.
>
>

To back up the DB use pg_dump and cron as mentioned. You can't use
triggers to update another database. If you are wanting to update a
concurrent database automatically, database replication is what you
want. Have a look at Slony-I or Mammoth Replicator

http://www.slony.info
http://www.commandprompt.com/products/mammothreplicator

>
>
>>4.) Sometimes IIS web server is unavailable and the web pages can' t
>>display for clients. Can you tell me the reasons and the methods to
>>overcome the problems?
>>
>>
>
>Sorry, don't know a thing about IIS.
>
>

Nor do I, and I'm hoping to keep it that way.

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Greg Stark 2005-12-21 21:59:03 Re: problem with nasty latin2 sorting
Previous Message Johannes Brgmann 2005-12-21 19:08:56 Re: plpgsql function returning SETOF