| От | Simon Riggs |
|---|---|
| Тема | Move tablespace |
| Дата | |
| Msg-id | 1271790989.8305.24713.camel@ebony обсуждение исходный текст |
| Ответы |
Re: Move tablespace
|
| Список | pgsql-hackers |
I just noticed that ALTER TABLE foo SET TABLESPACE new_tablespace; doesn't optimise writing WAL, so when streaming enabled it will copy the whole table to WAL and across the wire. My understanding was that ALTER TABLE had been optimised, though not as much as could be in this case. Following patch writes a new WAL record that just says "copy foo to newts" and during replay we flush buffers and then re-execute the copy (but only when InArchiveRecovery). So the copy happens locally on the standby, not copying from primary to standby. We do this just with a little refactoring and a simple new WAL message. So about 64 bytes rather than potentially gigabytes of data, which seems important when using SR. Simple patch, no new concepts, so I figure to apply this now. (Yes, I need to bump WAL format id as well). Objections? -- Simon Riggs www.2ndQuadrant.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера