Re: Logical Replication - detail message with names of missing columns

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Logical Replication - detail message with names of missing columns
Дата
Msg-id CAA4eK1Jk8FiF-HOQdLsUD82XxmapLtDuCRRk5sawDWVms+b10w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Logical Replication - detail message with names of missing columns  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Logical Replication - detail message with names of missing columns  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: Logical Replication - detail message with names of missing columns  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On Tue, Oct 6, 2020 at 12:14 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Mon, Oct 5, 2020 at 9:39 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> >
> > 3. The patch doesn't seem to be freeing the memory allocated for missingattsbuf.
> >
>
> I don't think we need to do that. We are passing missingattsbuf.data to ereport and we are safe without freeing up
missingattsbuf(wedon't reach the code after ereprot(ERROR,...)as the table sync worker anyways goes away after throwing
missingattributes error( if (sigsetjmp(local_sigjmp_buf, 1) != 0) in StartBackgroundWorker and then proc_exit(1)). Each
timea new table sync bg worker is spawned. 
>

Okay, by that logic, we don't even need to free memory for missingatts.

I have made a few changes, (a) moved free of missingatts in the caller
where we are allocating it. (b) added/edited/removed comments, (c) ran
pgindent.

Shall we backpatch this? I don't see any particular need to backpatch
this as this is a minor error message improvement and nobody has
reported any problem due to this. What do you think?

--
With Regards,
Amit Kapila.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: Prevent printing "next step instructions" in initdb and pg_upgrade
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: [doc] remove reference to pg_dump pre-8.1 switch behaviour