Re: Logical Replication of sequences
От | Nisha Moond |
---|---|
Тема | Re: Logical Replication of sequences |
Дата | |
Msg-id | CABdArM6=ru-ozpKv06pGUzy7qTrTKYrVRUFLjtiX3gBavH0igw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Logical Replication of sequences (Shlok Kyal <shlok.kyal.oss@gmail.com>) |
Список | pgsql-hackers |
On Wed, Jun 25, 2025 at 3:10 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote: > > > 4. Since we are not adding sequences in the list 'sub_remove_rels', > should we only palloc for (the count of no. of tables)? Is it worth > the effort? > /* > * Rels that we want to remove from subscription and drop any slots > * and origins corresponding to them. > */ > sub_remove_rels = palloc(subrel_count * sizeof(SubRemoveRels)); > The sub_remove_rels array allocates memory for all relations in the subscription, even though it only uses entries for those that are actually removed. While this may result in unnecessary allocation, even when only tables are involved. OTOH, as it’s a short-lived variable, pre-allocating can help with performance. This requires further analysis, I plan to handle this in the next version. -- Thanks, Nisha
В списке pgsql-hackers по дате отправления: