Re: macaddr 64 bit (EUI-64) datatype support

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Shay Rojansky <roji(at)roji(dot)org>, Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: macaddr 64 bit (EUI-64) datatype support
Date: 2016-11-10 06:42:17
Message-ID: CAJrrPGc9BLT-K3emEqC912LtOXNRhmKfYJB0nTBTwEzs_HPabQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 4, 2016 at 11:09 AM, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
wrote:

>
>
> On Tue, Oct 25, 2016 at 11:40 PM, Peter Eisentraut <
> peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>
>> On 10/25/16 1:38 AM, Haribabu Kommi wrote:
>> > Here I attached the first version of patch that supports both EUI-48 and
>> > EUI-64 type
>> > Mac addresses with a single datatype called macaddr. This is an variable
>> > length
>> > datatype similar like inet. It can store both 6 and 8 byte addresses.
>> > Variable length
>> > type is used because in case in future, if MAC address gets enhanced,
>> > still this type
>> > can support without breaking DISK compatibility.
>>
>> Since the world knows the 6-byte variant as MAC-48, shouldn't it be
>> renamed to macaddr48 or even mac48?
>
>
> Yes. Before doing this change, it is better to confirm the approach and
> then do all the changes.
>
> 1. Does everyone agrees that renaming the existing datatype without
> changing the OID?
>
> 2. The old macaddress datatype rename to mac48 macaddr48
> or macaddr6 or mac6.
>
> 3. Add the new datatype with the name that supports both 48 bit
> and 64 bit MAC address.
>
> 4. The new datatype is of variable length datatype similar like INET,
> so it can handle any future changes.
>

I didn't hear any problems with the approach in supporting the MACADDR
with 8 bytes storage. I will go with proposed design, and "mac48" as
the datatype name for the old macaddr.

Regards,
Hari Babu
Fujitsu Australia

On Fri, Nov 4, 2016 at 11:09 AM, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
wrote:

>
>
> On Tue, Oct 25, 2016 at 11:40 PM, Peter Eisentraut <
> peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>
>> On 10/25/16 1:38 AM, Haribabu Kommi wrote:
>> > Here I attached the first version of patch that supports both EUI-48 and
>> > EUI-64 type
>> > Mac addresses with a single datatype called macaddr. This is an variable
>> > length
>> > datatype similar like inet. It can store both 6 and 8 byte addresses.
>> > Variable length
>> > type is used because in case in future, if MAC address gets enhanced,
>> > still this type
>> > can support without breaking DISK compatibility.
>>
>> Since the world knows the 6-byte variant as MAC-48, shouldn't it be
>> renamed to macaddr48 or even mac48?
>
>
> Yes. Before doing this change, it is better to confirm the approach and
> then do all the changes.
>
> 1. Does everyone agrees that renaming the existing datatype without
> changing the OID?
>
> 2. The old macaddress datatype rename to mac48 macaddr48
> or macaddr6 or mac6.
>
> 3. Add the new datatype with the name that supports both 48 bit
> and 64 bit MAC address.
>
> 4. The new datatype is of variable length datatype similar like INET,
> so it can handle any future changes.
>
>
>
>> > Currently the patch lacks of documentation. Comments?
>>
>> For patches like this, it would be good if you included a mock commit
>> message so that someone who comes in late knows what's going on.
>
>
> Thanks, I will do it from now onward.
>
>
> Regards,
> Hari Babu
> Fujitsu Australia
>

--
Regards,
Hari Babu
Fujitsu Australia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-11-10 06:54:58 Re: Bug in comparison of empty jsonb arrays to scalars
Previous Message Michael Paquier 2016-11-10 06:16:53 Re: [PATCH] Reload SSL certificates on SIGHUP