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 1ptqNR-0003w3-A1 for pgsql-general@arkaria.postgresql.org; Tue, 02 May 2023 13:49:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ptqNP-0000mQ-MA for pgsql-general@arkaria.postgresql.org; Tue, 02 May 2023 13:49:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptqNP-0000mH-74 for pgsql-general@lists.postgresql.org; Tue, 02 May 2023 13:49:07 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ptqNK-0008tx-8G for pgsql-general@lists.postgresql.org; Tue, 02 May 2023 13:49:06 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-50b383222f7so4990018a12.3 for ; Tue, 02 May 2023 06:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20221208.gappssmtp.com; s=20221208; t=1683035341; x=1685627341; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=nPn6BcbzQiiFx5tT6JC+vT2/sAMlQlfoEPd4S/fi1dA=; b=5Fixiuf/TB8o0TtQlT/oc1cQiP459pHgDNmiT8WHIDWesJV8JzLE1C5xpIHGClwttX pyd30769cZqQ90lD+EYk287cCL7c9+EwgsUocc5Kq9gH0sIuGxPlEUjWkLGQs3u/Gcrs f2ClUlzK06Xp7+ylGdQ+jYqWFPknhENZSiTJvqeNz2ukSbaamcyAuFInZJeItS8o8NGM Ua3aGHOSrdpQfcJAncSywwl/bxKTUgkR87WgvHAECkd/mVeSpyKYHPcedUeCJ6wg+I8T mPJKasvSIVJTa4ZJ1W7PUyVxGnVQgzB7RsWxtyBnx4QMksbT4vCFkexP8SmRHfq6aIHC eLIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683035341; x=1685627341; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nPn6BcbzQiiFx5tT6JC+vT2/sAMlQlfoEPd4S/fi1dA=; b=V7/luIlzpJk36sxO3Pj6JV0JuNYc3Oapcs0pdNwd6O9Z/Ll/fvS0l55ux9Gwh8hTP/ 4ckDRaB9TVDXuPRWaVe7FLDdhMu2UZm02zhVYJu1YNdodLywd/cIV3v2dWpNhZtJKScz kxNi148iQ7033iqS5NxRUMUsWTEmAQtOzbPsOhi+Ta/il4cM0VuyGHm3wy315S01sJcd QJBf2Z1QlUy8U1xTmZD4BTiCptiZEtkU8JeKQi3lDB0BVkrlm4NVZBZ2Cj/uqTYZyihq dX9hh3jRN0G2RnBhs41dgUWFVMCQKbUJD/+Xc081calo+py9OuPhykeJZ0Q2DNN6/fOp 7zdw== X-Gm-Message-State: AC+VfDzIiRpt/0RxkzYCqszgREAwYmX+akaULaFzv8bamIyjsINiJIcF phLZS05l4SSu2ab5Q2dTj6TCXw== X-Google-Smtp-Source: ACHHUZ7GwppoOZkSz0QvsYqUEECYHIvevSsrymLmk2ME5e6CGIDUJJdGNkwK3GA1KFtEB425yDWGVw== X-Received: by 2002:a05:6402:1244:b0:50b:d861:50b3 with SMTP id l4-20020a056402124400b0050bd86150b3mr534470edw.4.1683035341430; Tue, 02 May 2023 06:49:01 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:d2eb:ed38:f668:68cd:9556]) by smtp.gmail.com with ESMTPSA id u2-20020aa7d882000000b0050bc22b255dsm2979370edq.71.2023.05.02.06.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:49:01 -0700 (PDT) Message-ID: Subject: Re: libpq and multi-threading From: Laurenz Albe To: "Michael J. Baars" , pgsql-general@lists.postgresql.org Date: Tue, 02 May 2023 15:49:00 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-05-02 at 11:38 +0200, Michael J. Baars wrote: > I have a question about libpq and multi-threading. >=20 > In the PostgreSQL documentation (https://www.postgresql.org/docs/15/libpq= -threading.html) > it says that results can be passed around freely between threads. However= , when I try to read > the result from the parent thread, the program crashes with a segmentatio= n fault. That's too little information. Yours, Laurenz Albe