Re: Re: Hot Standby query cancellation and Streaming Replication integration
От | Josh Berkus |
---|---|
Тема | Re: Re: Hot Standby query cancellation and Streaming Replication integration |
Дата | |
Msg-id | 4B8AC85A.6090807@agliodbs.com обсуждение исходный текст |
Ответ на | Re: Re: Hot Standby query cancellation and Streaming Replication integration (Joachim Wieland <joe@mcknight.de>) |
Ответы |
Re: Re: Hot Standby query cancellation and Streaming Replication
integration
Re: Re: Hot Standby query cancellation and Streaming Replication integration Re: Re: Hot Standby query cancellation and Streaming Replication integration |
Список | pgsql-hackers |
All, First, from the nature of the arguments, we need to eventually have both versions of SR: delay-based and xmin-pub. And it would be fantastic if Greg Smith and Tom Lane could work on xmin-pub to see if we can get it ready as well. I also think, based on the discussion and Greg's test case, that we could do two things which would make the shortcomings of delay-based SR a vastly better experience for users: 1) Automated retry of cancelled queries on the slave. I have no idea how hard this would be to implement, but it makes the difference between writing lots of exception-handling code for slave connections (unacceptable) to just slow response times on the slave (acceptable). 2) A more usable vacuum_defer_cleanup_age. If it was feasible for a user to configure the master to not vacuum records less than, say, 5 minutes dead, then that would again offer the choice to the user of slightly degraded performance on the master (acceptable) vs. lots of query cancel (unacceptable). I'm going to test Greg's case with vacuum_cleanup_age used fairly liberally to see if this approach has merit. Why do I say that "lots of query cancel" is "unacceptable"? For the simple reason that one cannot run the same application code against an HS+SR cluster with lots of query cancel as one runs against a standalone database. And if that's true, then the main advantage of HS+SR over Slony and Londiste is gone. MySQL took great pains to make sure that you could run the same code against replicated MySQL as standalone, and that was based on having a fairly intimate relationship with their users (at the time, anyway). Another thing to keep in mind in these discussions is the inexpensiveness of servers today. This means that, if slaves have poor performance, that's OK; one can always spin up more slaves. But if each slave imposes a large burden on the master, then that limits your scalability. --Josh Berkus
В списке pgsql-hackers по дате отправления: