Re: something more about my question about performance
От | Richard Huxton |
---|---|
Тема | Re: something more about my question about performance |
Дата | |
Msg-id | 004a01c0a28a$80f1f120$1001a8c0@archonet.com обсуждение исходный текст |
Ответ на | something more about my question about performance ("Enrico Mangano" <enrico.mangano@nethouse.it>) |
Список | pgsql-general |
From: "Enrico Mangano" <enrico.mangano@nethouse.it> > I wrote : > >Hello, > >i have one postgresql server (7.0) where several users access. > >Is there any way to improve performance for: > > > >i) accesses of different users at different dbs > >ii) accesses of different users at the same db > > > >Thanks. > > My question simple wanted know if it is possible, to improve > performance, to make > users access to different postgres servers, making access, for example, > the user1 to the db1 > on the server1, the user2 to db2 on the server2 and so on. If it > possible, how can I do that? Ah - that makes a little more sense. Obviously you can have different databases on different machines, but I presume you want the users to just access one name: user1 connects to dbserver->database1 which goes to machine1 user2 connects to dbserver->database2 which goes to machine2 Good idea - means you can rearrange things at the backend without having to concern the users. There's no way to do this "out of the box" but if you have some control over the clients then you could try the following: 1. Write a small wrapper to psql that scans the command-line parameters and pulls out the database name. 2. This either checks a local file or talks to a control server that picks the correct backend machine. 3. The wrapper then launches psql with all the provided parameters and the hostname fetched. Result: user is connected to the relevant machine without having to know which it is. You could do something similar with perl/php/java connect procedures. If you want one database spread over several machines then you will need to look at the replication in /contrib in 7.1, but I can't tell you whether that would work in your case. Tom - sorry to bother you but this sounds like the sort of thing that might be handled by the front<->postmaster protocol on startup (returns a ReconnectTo packet). Would this be a generally useful thing for people, if so has it been done, if it hasn't is it a good place for a newbie to get used to the code? (it does sound like I'm volunteering doesn't it?) - Richard Huxton
В списке pgsql-general по дате отправления: