Re: Solaris testers wanted for strxfrm() behavior

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Jim Mlodgenski <jimmy76(at)gmail(dot)com>
Subject: Re: Solaris testers wanted for strxfrm() behavior
Date: 2015-07-04 00:36:36
Message-ID: 20150704003636.GA856928@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 01, 2015 at 03:22:33AM -0400, Noah Misch wrote:
> On Tue, Jun 30, 2015 at 09:45:08AM -0400, Tom Lane wrote:
> > Noah Misch <noah(at)leadboat(dot)com> writes:
> > > On Sun, Jun 28, 2015 at 07:00:14PM -0400, Tom Lane wrote:
> > >> Another idea would be to make a test during postmaster start to see
> > >> if this bug exists, and fail if so. I'm generally on board with the
> > >> thought that we don't need to work on systems with such a bad bug,
> > >> but it would be a good thing if the failure was clean and produced
> > >> a helpful error message, rather than looking like a Postgres bug.
> >
> > > Failing cleanly on unpatched Solaris is adequate, agreed. A check at
> > > postmaster start isn't enough, because the postmaster might run in the C
> > > locale while individual databases or collations use problem locales. The
> > > safest thing is to test after every setlocale(LC_COLLATE) and
> > > newlocale(LC_COLLATE). That's once at backend start and once per backend per
> > > collation used, more frequent than I would like. Hmm.

Solaris does not have locale_t or strxfrm_l(), so per-collation checks aren't
relevant after all. Checking at postmaster start and backend start seems
cheap enough, hence this patch.

Attachment Content-Type Size
strxfrm-overflow-bugs-v1.patch text/plain 5.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-07-04 01:16:58 Re: Synch failover WAS: Support for N synchronous standby servers - take 2
Previous Message Peter Geoghegan 2015-07-04 00:33:31 More work on SortSupport for text - strcoll() and strxfrm() caching