Ray's Knowledge Base
Unlock

strtod takes a process-wide locale lock and serializes parallel decoders

FactVerified 4 Oct 2026Holds anywhere
Fact. A statement and the evidence for it.

Statement#

Calling strtod for every string value in a parallel decode serializes the workers. A scan decode called parse_number (so strtod) for every string value in bind_field, numeric or not. Fix: parse only fields typed as numbers, and reject text that cannot start a number before calling strtod. Keep that first-character check locale-safe: in a comma-decimal locale strtod accepts ,5, so , must stay an allowed first character if the old behaviour must hold.

Evidence#

Observed note, 2026-10-03, dftracer-utils scan decode.

Also found by searching

  • strtod serializes parallel decode workers
  • parallel parsing slow because of strtod locale lock
  • strtod accepts comma in comma-decimal locale