Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p05dA-0004LN-TR for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 18:46:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p05d9-00078S-QM for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 18:46:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p05d9-00078I-9G for pgsql-hackers@lists.postgresql.org; Tue, 29 Nov 2022 18:46:55 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p05d6-0006M0-Nn for pgsql-hackers@postgresql.org; Tue, 29 Nov 2022 18:46:54 +0000 Received: by mail-pl1-x632.google.com with SMTP id p24so10571891plw.1 for ; Tue, 29 Nov 2022 10:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=WFNYRhUt0iywaIc5tra5v6AuAmozd5vpBc0ZV9pHei8=; b=EsaCooTKvlLpYQveZYScTb/rVC+DYmS/6/Lz5pX4lWFvzqwSEHsEaQcR/hS0ZfHOaJ FvGdgXqBsC8j2qjA+UC5kqp/RFrA0S2gATqKpfvsX9aHafxU72PjQZBzgWafol53DDNG S0Sp2B90oUWK+iUtmtrYcvlexeZK0AtpZ+zYSdliFc7pHDzRbrPoP8jm5QImLUUIjOE3 5Bo6RISl3SLqSTmxPH4+b5PYod5j/OsrAVctE6Qb4yTglJjpLlvb9UoOH7wkmYM6v6sy FMnH+Xn6M+PbKu4/Wd8mLFwNC26q2Na4Oj0LJNDj7orVb90+6ief9VRuq7RgvBsvST53 dWMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WFNYRhUt0iywaIc5tra5v6AuAmozd5vpBc0ZV9pHei8=; b=6pKvNEEqXwvkGrXv55HF/yDKLeMLBhTihQVhIZ7y3PE5xNF6JzKjW06vR9XjUkp7jv zUtZSA2TEAf0aElsayPOR/YLe7JWX3TRXI9KswB9DMdTRfzIPrQzS9AMX0jbVpTTUBGp 8FVkhLJ8768wxPdvDdjevNjR7ncyoQn7ex2uBEfPPbP0mDr6fqzmH0B6dqFNrr0CH/LP SamU0LQWevzfFcgoYlu3ZoGiTKt676vGCyZ7/PTpXua8gSNu45M7i9FlJf+OL7OoBokG JkYm1kitn6G6Zy4YdfRlkIRw7dGRW2LppBFTZMLk9wKj6VEsQF2eJbPqtomfGKbf1cLG t4oA== X-Gm-Message-State: ANoB5plOqHMp9HrmbuKTwuIhpbw/UK6hBLZT1eX2qaVrP+dZVzbZ6wMr rDEoCMoSRt8EXeG+crd2skw/sw== X-Google-Smtp-Source: AA0mqf5OXTB1damgLtzehj4B667EWsGof22cICTZriRmL7q3D8vS5SLdMcNkQwuNSmee3jq4HlfzEg== X-Received: by 2002:a17:902:efd6:b0:189:94e6:6a8e with SMTP id ja22-20020a170902efd600b0018994e66a8emr7454121plb.72.1669747611701; Tue, 29 Nov 2022 10:46:51 -0800 (PST) Received: from jeff-laptop.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id z10-20020a1709027e8a00b001897bfc9800sm6558402pla.53.2022.11.29.10.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 10:46:51 -0800 (PST) Message-ID: Subject: Re: Collation version tracking for macOS From: Jeff Davis To: Robert Haas Cc: Thomas Munro , Peter Eisentraut , Jeremy Schneider , Peter Geoghegan , "Finnerty, Jim" , "Nasby, Jim" , Tom Lane , pgsql-hackers Date: Tue, 29 Nov 2022 10:46:48 -0800 In-Reply-To: References: <398aabd1-ad95-ba2d-d70a-dd5d90bf6e07@enterprisedb.com> <606bd2baa6d65b38fee6eb23bba40c5da210255b.camel@j-davis.com> <9f8e9b5a3352478d4cf7d6c0a5dd7e82496be4b6.camel@j-davis.com> <83faecb4a89dfb5794938e7b4d9f89daf4c5d631.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2022-11-29 at 12:32 -0500, Robert Haas wrote: > You know more about this than I do, for sure, so don't let my vote > back the project into a bad spot. I'm going back and forth myself. I haven't found a great answer here yet. > But, yeah, the thing you mention > here is what I'm worried about. Without a way to force a certain > behavior for a certain particular collation, you don't have an escape > valve if the global library ordering isn't doing what you want. One bit of weirdness is that I may have found another ICU problem. First, install 63.1, and you get (editing for clarity): $ ls -l /path/to/libicui18n.so.63* /path/to/libicui18n.so.63 -> libicui18n.so.63.1 /path/to/libicui18n.so.63.1 $ ls -l /path/to/libicuuc.so.63* /path/to/libicuuc.so.63 -> libicuuc.so.63.1 /path/to/libicuuc.so.63.1 $ ls -l /path/to/libicudata.so.63* /path/to/libicudata.so.63 -> libicudata.so.63.1 /path/to/lib/libicudata.so.63.1 $ ldd /path/to/libicui18n.so.63.1 libicuuc.so.63 =3D> /path/to/libicuuc.so.63 libicudata.so.63 =3D> /path/to/libicudata.so.63=20 OK, now install 63.2. Then you get: $ ls -l /path/to/libicui18n.so.63* /path/to/libicui18n.so.63 -> libicui18n.so.63.2 /path/to/libicui18n.so.63.1 /path/to/libicui18n.so.63.2 $ ls -l /path/to/libicuuc.so.63* /path/to/libicuuc.so.63 -> libicuuc.so.63.2 /path/to/libicuuc.so.63.1 /path/to/libicuuc.so.63.2 $ ls -l /path/to/libicudata.so.63* /path/to/libicudata.so.63 -> libicudata.so.63.2 /path/to/libicudata.so.63.1 /path/to/libicudata.so.63.2 $ ldd /path/to/libicui18n.so.63.2 libicuuc.so.63 =3D> /path/to/libicuuc.so.63 libicudata.so.63 =3D> /path/to/libicudata.so.63 The problem is that the specific minor version 63.1 depends on only the major version of its ICU link dependencies. When loading libicui18n.so.63.1, you are actually pulling in libicuuc.so.63.2 and libicudata.so.63.2. When I tried this with Thomas's patch, it caused some confusing problems. I inserted a check that, when you open a library, that the requested and reported versions match, and the check failed when multiple minors are installed. In other words, opening libicui18n.so.63.1 reports a version of 63.2! (Note: I compiled ICU with --enable-rpath, but I don't think it matters.) Summary: even locking down to a minor version does not seem to identify a specific ICU library, because its shared library dependencies do not reference a specific minor version. > It's entirely possible that the scenario I'm worried about is too > remote in practice to be concerned about. I don't know how this stuff > works well enough to be certain. It's just that, on the basis of > previous experience, (1) it's not that uncommon for people to > actually > end up in situations that we thought shouldn't ever happen and (2) > code that deals with collations is more untrustworthy than average. Yeah... --=20 Jeff Davis PostgreSQL Contributor Team - AWS