Re: ATTACH/DETACH PARTITION CONCURRENTLY
От | Robert Haas |
---|---|
Тема | Re: ATTACH/DETACH PARTITION CONCURRENTLY |
Дата | |
Msg-id | CA+TgmoY+kOiUpokCge0C0aru3B1jzaf2OgBWrKpK42TycJMVEA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ATTACH/DETACH PARTITION CONCURRENTLY (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: ATTACH/DETACH PARTITION CONCURRENTLY
|
Список | pgsql-hackers |
On Thu, Jan 31, 2019 at 6:00 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > > - 0003 doesn't have any handling for parallel query at this point, so > > even though within a single backend a single query execution will > > always get the same PartitionDesc for the same relation, the answers > > might not be consistent across the parallel group. > > That doesn't sound good. I think the easiest would be to just serialize > the PartitionDesc and send it to the workers instead of them recomputing > it, but then I worry that this might have bad performance when the > partition desc is large. (Or maybe sending bytes over pqmq is faster > than reading all those catalog entries and so this isn't a concern > anyway.) I don't think we'd be using pqmq here, or shm_mq either, but I think the bigger issues is that starting a parallel query is already a pretty heavy operation, and so the added overhead of this is probably not very noticeable. I agree that it seems a bit expensive, but since we're already waiting for the postmaster to fork() a new process which then has to initialize itself, this probably won't break the bank. What bothers me more is that it's adding a substantial amount of code that could very well contain bugs to fix something that isn't clearly a problem in the first place. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: