Re: Removed extra memory allocations from create_list_bounds

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Removed extra memory allocations from create_list_bounds
Date: 2021-07-05 17:03:33
Message-ID: 20210705170333.GA21248@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Also, if you're going to remove the initializations here, maybe you'd also
change i and j to C99 "for" declarations like "for (int i=0, j=0; ...)"

- PartitionListValue **all_values = NULL;
- ListCell *cell;
- int i = 0;
- int ndatums = 0;
+ PartitionListValue *all_values;
+ int i;
+ int j;
+ int ndatums;

Same in get_non_null_list_datum_count()

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-07-05 17:10:24 Re: Race condition in InvalidateObsoleteReplicationSlots()
Previous Message Álvaro Herrera 2021-07-05 17:00:38 Re: Race condition in InvalidateObsoleteReplicationSlots()