Re: Hot Standby query cancellation and Streaming Replication integration
От | Greg Stark |
---|---|
Тема | Re: Hot Standby query cancellation and Streaming Replication integration |
Дата | |
Msg-id | 407d949e1002261940n43c521d6i1bb3220997886e09@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Hot Standby query cancellation and Streaming Replication integration (Greg Smith <greg@2ndquadrant.com>) |
Ответы |
Re: Hot Standby query cancellation and Streaming Replication
integration
|
Список | pgsql-hackers |
On Sat, Feb 27, 2010 at 2:43 AM, Greg Smith <greg@2ndquadrant.com> wrote: > > But if you're running the 8 hour report on the master right now, aren't you > already exposed to a similar pile of bloat issues while it's going? If I > have the choice between "sometimes queries will get canceled" vs. "sometimes > the master will experience the same long-running transaction bloat issues as > in earlier versions even if the query runs on the standby", I feel like > leaning toward the latter at least leads to a problem people are used to. If they move from running these batch queries on the master to running them on the slave then sure, the situation will be no worse than before. But if they move from having a plain old PITR warm standby to having one they can run queries on they might well assume that the big advantage of having the standby to play with is precisely that they can do things there that they have never been able to do on the master previously without causing damage. I agree that having queries randomly and unpredictably canceled is pretty awful. My argument was that max_standby_delay should default to infinity on the basis that any other value has to be picked based on actual workloads and SLAs. My feeling is that there are probably only two types of configurations that make sense, a HA replica with a low max_standby_delay or a reporting replica with a high max_standby_delay. Any attempt to combine the two on the same system will only work if you know your application well and can make compromises with both. I would also like to be able to handle load balancing read-only queries but that will be really tricky. You want up-to-date data and you want to be able to run moderately complex queries. That kind of workload may well require synchronous replication to really work properly. -- greg
В списке pgsql-hackers по дате отправления: