Re: Too much memory allocated for ReorderBufferDiskChange

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Too much memory allocated for ReorderBufferDiskChange
Date: 2018-03-05 15:56:02
Message-ID: CAHE3wgiZV4FwjDtffcu_BLrtA0aceoT4e4275cf14WOd+jKy5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2018-03-05 12:26 GMT-03:00 Antonin Houska <ah(at)cybertec(dot)at>:
> ! ReorderBufferSerializeReserve(rb,
> ! sizeof(ReorderBufferDiskChange) + ondisk->size);
> ondisk = (ReorderBufferDiskChange *) rb->outbuf;
>
ReorderBufferSerializeReserve() always does a repalloc here
(ReorderBufferDiskChange size is always greater than zero) then the
allocation size is correct.

--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2018-03-05 15:58:12 Re: [Patch] Checksums for SLRU files
Previous Message David Steele 2018-03-05 15:50:44 Re: Re: [HACKERS] PoC: custom signal handler for extensions