Re: pg_upgrade: make the locale comparison more tolerating

From: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
To: Pavel Raiskup <praiskup(at)redhat(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade: make the locale comparison more tolerating
Date: 2014-01-30 10:56:51
Message-ID: CAGPqQf2ApFiyXT5EHr1t4a62Sh19Ft0Yz3e9HU5qowJMWJc1Cg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Pavel,

I looked at your latest cleanup patch. Yes its looks more cleaner in term
equivalent_locale & equivalent_encoding separate functions.

I did run the test again on latest patch and all looks good.

Marking it as ready for committer.

Regards,

On Fri, Jan 24, 2014 at 9:49 PM, Pavel Raiskup <praiskup(at)redhat(dot)com> wrote:

> Rushabh, really sorry I have to re-create the patch and thanks a
> lot for looking at it!
>
> Looking at the patch once again, I see that there were at least two
> problems. Firstly, I used the equivalent_locale function also on the
> encoding values. Even if that should not cause bugs (as it should result
> in strncasecmp anyway), it was not pretty..
>
> The second problem was assuming that the locale specifier "A" is not
> longer then locale specifier B. Comparisons like 'en_US.utf8' with
> 'en_US_.utf8' would result in success. Bug resulting from this mistake is
> not real probably but it is not nice anyway..
>
> Rather cleaning the patch once more, attached,
> Pavel
>

--
Rushabh Lathia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-01-30 11:33:23 Re: Performance Improvement by reducing WAL for Update Operation
Previous Message Pavel Stehule 2014-01-30 10:38:09 Re: patch: option --if-exists for pg_dump