replication question - connections on slave

Поиск
Список
Период
Сортировка
От Aras Targaryen
Тема replication question - connections on slave
Дата
Msg-id CAC44bgrKg4gbpU0jqGefyspazeqAR20FD70zofRD9vpmUDfmcQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-admin
Hi

I have a replicated slave copy of my database. Our 6 year old - non modular web app does not have the connection selector for our PHP scripts, so PHP opens SQL queries to the default (last connection) made by the scripts. So if i open a connection to the slave somewhere, it would become the latest connection and would break write-queries that defaults to it.

I was wondering if there is a downfall to opening the slave connection first then master, so master would be default. But if there is no read queries on that page i specially direct to slave, the slave connection would be opened for nothing and simply close after script executes. Is this a horrible practice in terms of performance? 

thanks

В списке pgsql-admin по дате отправления:

Предыдущее
От: Spike Grobstein
Дата:
Сообщение: Re: error during pg_dump
Следующее
От: Greg Williamson
Дата:
Сообщение: Database size stays constant but disk space keeps shrinking -- postgres 9.1