Re: portability of "designated initializers"

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: portability of "designated initializers"
Date: 2008-12-05 03:43:58
Message-ID: 4938A37E.9080301@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera escreveu:

> I've already modified your patch a bit ... please send your updated
> patch so I can merge it into mine. However, my changes were also
> relatively minor. Since Tom wants it to be entirely rewritten then
> maybe merging minor fixes to it is a waste of time ...
>
Since Alvaro is involved in finishing another patches, I improved the first
patch based on discussion. What did I do?

(i) change from relOptXXX arrays to relOpts as Tom pointed out in [1];
(ii) fix some memory alloc/free problems;
(iii) add some code to uniform the output of boolean parameters (output will
be true/false);
(iv) change the *_base_thresh names to *_threshold. I know the names are not
appropriated but postgresql.conf use similar ones;
(v) rollback the RelationGetXXX changes as Tom pointed out in [2];
(vi) fillfactor is stored as a separate variable in RelationData;
(vi) include documentation.

I did some small benchmarks to figure out if storing the parameters as a bytea
(rd_options) has any performance penalty; i don't see any significant
difference but my laptop is not a good parameter. Comments?

PS> I don't include regression tests but if you think it's important to
exercise that code path, I will elaborate some tests.

[1] http://archives.postgresql.org/pgsql-hackers/2008-11/msg01494.php
[2] http://archives.postgresql.org/pgsql-hackers/2008-11/msg01500.php

--
Euler Taveira de Oliveira
http://www.timbira.com/

Attachment Content-Type Size
reloptv2.diff.gz application/x-gzip 22.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2008-12-05 03:50:58 Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Previous Message Bruce Momjian 2008-12-05 03:41:18 Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)