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 1mRQsV-0004gG-S6 for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Sep 2021 03:18:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mRQsU-0002RD-MK for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Sep 2021 03:18:58 +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 1mRQsU-0002Lz-7s for pgsql-bugs@lists.postgresql.org; Sat, 18 Sep 2021 03:18:58 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mRQsR-0005pD-2o for pgsql-bugs@lists.postgresql.org; Sat, 18 Sep 2021 03:18:57 +0000 Received: by mail-qv1-xf35.google.com with SMTP id w8so1587828qvu.1 for ; Fri, 17 Sep 2021 20:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ntIJfDcvTSfZ68oGUcbtJ3anOvpNgNtzkWe5IDJ5Zzw=; b=bWYnz2+x8ImYqXRK+zfWaUyI3Db0JCC39AA5gevwtX0wyXeZ3x7OcwYU+xP30qp4e3 vEVnlkvW3kZd7A8iyG3DQlFu2DBML286MFxrAKimfiuU3KUM5W8pRfWgwyr8tN/paF+k efSWPxApRYTeeMJMecmtpLkhbVZcpCZxAks2s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=ntIJfDcvTSfZ68oGUcbtJ3anOvpNgNtzkWe5IDJ5Zzw=; b=x9jZf+Z1C+jRpBlA08ZkTM+S9Zkuei7yARQVN9RpXzz1EXEA0VlgZAbls9YsXo/TXm GxlW40QL9GYbBPzoYrS4kS7t+O7rtzBXTnmyQ8onB8suZh6MdwTU+IiPRGcD7orxNMaa t2726coM4nfS0voNOW/cWBsG5LwoLYzxx923gbcqrOkxUvzsX1IyutwOKf0xAa2jkOiz Blfs0M3244ir+alMv+vIcWaXCrbf40CZnxlK/5x/dEPgNlWnt7GUz86BX0W4LYKVZrat ywiIzwibTCWiTEMYcFZjDO3pds+iTaQJFcI2xgJpbWMx/MbCh+SsyEvngZLB6BWcDC61 0g3w== X-Gm-Message-State: AOAM531FZMowoJGHiVGy+hXEKBprocOIYkf+a9yFcSNop3n7yxUS4irA BTIdMMqx0ErDbyBTuU2Cx8b2/Q== X-Google-Smtp-Source: ABdhPJwRdQ6yjWo+aHmdUfy2ZUUESPuUSs9w3KKj/Mdq8Tk+ur6z3svSbqoxJ9jJNInFOdC9xKCuCQ== X-Received: by 2002:a0c:ab4e:: with SMTP id i14mr14330449qvb.28.1631935132558; Fri, 17 Sep 2021 20:18:52 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id h9sm6122523qkl.4.2021.09.17.20.18.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Sep 2021 20:18:51 -0700 (PDT) Date: Fri, 17 Sep 2021 20:18:49 -0700 From: Noah Misch To: =?utf-8?B?0JTQvNC40YLRgNC40Lkg0KHQtdC60YDQtdGC0L7Qsg==?= Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17070: Sometimes copy from ingnores transaction Message-ID: <20210918031849.GA2911957@rfd.leadboat.com> References: <17070-701777d014fe5684@postgresql.org> <20210822183849.GA1747628@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Sep 17, 2021 at 02:13:43PM +0300, Дмитрий Секретов wrote: > It happens very rarely and it happens in production (2-3 times a year), i > can't log all. I look into code and we always start transaction. We have > tests - rollback works fine. But it happened. A missing BEGIN is something like one hundred times as likely as a PostgreSQL bug here. I understand you can't set log_statement=all in production. If you do a non-production test with log_statement=all, you may be able to locate the missing BEGIN.