From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "Haifang Wang (Centific Technologies Inc)" <v-haiwang(at)microsoft(dot)com> |
Cc: | Rahul Pandey <pandeyrah(at)microsoft(dot)com>, Vishwa Deepak <Vishwa(dot)Deepak(at)microsoft(dot)com>, Shawn Steele <Shawn(dot)Steele(at)microsoft(dot)com>, Amy Wishnousky <amyw(at)microsoft(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Shweta Gulati <gulatishweta(at)microsoft(dot)com>, Ashish Nawal <nawalashish(at)microsoft(dot)com> |
Subject: | Re: [EXTERNAL] Re: Windows Application Issues | PostgreSQL | REF # 48475607 |
Date: | 2024-07-21 13:28:15 |
Message-ID: | 0ba29a3c-9c1c-44c4-84a0-3405f8464075@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2024-07-21 Su 7:54 AM, Thomas Munro wrote:
> A minor release deadline is only a couple of weeks away and
> unfortunately we still have no confirmation from a Windows user that
> this technique can be used to unbreak a database cluster that actually
> goes though that exact upgrade sequence. So I spent today figuring
> out how to write a TAP test to try to convince myself of that in the
> abstract. No C code change from v2. Does the test show a useful
> enough pathway that is likely to help people in future cases at least?
>
> I learned two new things:
>
> 1. With a remapped locale, you can log into your existing databases
> again, but CREATE DATABASE doesn't work (see test). That must have
> been the case for the historical transitions that were hard-coded
> (Macau etc); this is no different, it's just that the mapping table is
> now user-changeable. In other words, this just gives an administrator
> a way to log into a cluster again after such a change, but then they
> really need to update the names in catalogs, at least for any database
> that might be used as a template, to get a 100% functional system. So
> I have added a paragraph to the documentation piece to explain that.
>
> 2. Including the encoding suffix eg "en-US.1252" doesn't actually
> work after all (discovered by CI). You have to use just "en-US". (I
> guess ".UTF-8" must be a special case.) So I have updated the
> documentation example.
I don't have a general comment, at least yet, but a couple, mostly
stylistic, on your TAP test.
change
if ($^O eq 'MSWin32')
to
if ($windows_os)
Also your use of "is()" is unidiomatic. The expected value should come
after the received value, not before. While your use won't change the
success or failure of the result, the message on failure will be at best
confusing. (I ran into this the other day, so it's fresh in my memory).
See Test::More documentation.
Using all upper case for variables is not our usual perl style (or
anybody else's that I am aware of). Mostly we just use lower case with
underscores. If you use the "constant" module upper case letters are
usually used, but then the things defined are bare words, and come with
some caveats, and I don't think you want to use it here.
The substance of the test looks good.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Christophe Pettus | 2024-07-21 16:52:36 | Re: BUG #18547: bemused by your unhelpful installation guides |
Previous Message | Thomas Munro | 2024-07-21 11:54:37 | Re: [EXTERNAL] Re: Windows Application Issues | PostgreSQL | REF # 48475607 |