Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j9FZR-0002kz-IS for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 21:59:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9FZP-0008NT-4N for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 21:59:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j9FZO-0008NL-NV for pgsql-hackers@lists.postgresql.org; Tue, 03 Mar 2020 21:59:18 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j9FZL-0005le-Qg for pgsql-hackers@postgresql.org; Tue, 03 Mar 2020 21:59:18 +0000 Received: by mail-wm1-x344.google.com with SMTP id u9so4509907wml.3 for ; Tue, 03 Mar 2020 13:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kgFeXOLYfWwfviGYt6PlWMqMTowxhCjn0lnrCqMseK0=; b=b8gt2fCUS2q5LJdsnKUV9nribn3SJLEGrqB7B2C2a/37VnICOCAh3OOukeYqtoZIkV t+TwbUkk5hHtUW2i5RBv2lKukQPAUafzawL2m74nqtGe1DDOTN1hpm4wnkpbngjgptZu eKazI7bH10slmaQ5BBXT5obe5ncgLt3uMjqLoq/w4++i0anIJrtvAMottX9ONSak+nag BQl9LKYQAPYrK+S8Yw2NmMNrgDr9XMw4qF0QR+hK9n86ptM+A2Nu/2X6IIOnsNXs3ojR eenkPsxh8yUQmwEWa3AGKPx824NiMDU4LBbKYs9qavp1zKYc+x9svWODKQoMvYwdWGuU 1V1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kgFeXOLYfWwfviGYt6PlWMqMTowxhCjn0lnrCqMseK0=; b=r+kfgXXJuJdVy08mrdKWHLQjz+cJZv2Aey+ij+Mu24jkB8kqiis9fY4G+DZYBHGG2u 4LJDy+wH0orl3m3M+eNv8WxqUfcjyoPg75hC0TKxLCgRoAzwnqAkzKMS8D5sC01weX1f jTdVvXTamaaAbczjizgr7a5cQ+fmE5QSH+gpalr3iC+39DMhTycWYOYOFB52Ey7tv7DM XOjirjRINfZKLNXIGjUZFxmFZtGov8SkvgAv3gWZrpM6Nswtg9F3U2Yc9llHZEo8giQa R4H1JRk+WPWQnPgXkZHhwXwXaBvCjD/nSeqp2dSEcyTSgMsCKSvWj6TDaiDePAeNTjWw eeyg== X-Gm-Message-State: ANhLgQ1Gsbsgzw0e8ZrBtg3rR+wElTiHVuBsmpIB0s3Z0ggt/XIgTlHn 0h7Wc7mJznXODE7hny4WdG+bAA== X-Google-Smtp-Source: ADFU+vvbUFMvewqX1zhEeyfcZeTQBvwggA7nlHsAH+VnumiZlKzkbEGI+BBElEgL9jFL5mESpSpNzA== X-Received: by 2002:a1c:964f:: with SMTP id y76mr540408wmd.62.1583272754866; Tue, 03 Mar 2020 13:59:14 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id o9sm37270978wrw.20.2020.03.03.13.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2020 13:59:13 -0800 (PST) Date: Tue, 3 Mar 2020 22:59:11 +0100 From: Tomas Vondra To: Dilip Kumar Cc: Amit Kapila , Michael Paquier , Peter Eisentraut , PostgreSQL Hackers Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions Message-ID: <20200303215911.sxlyi6nsbs2lzwhm@development> References: <20200303214646.6adway2z5wnapjem@development> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="dus7xrj6qe3zbayp" Content-Disposition: inline In-Reply-To: <20200303214646.6adway2z5wnapjem@development> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --dus7xrj6qe3zbayp Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline D'oh! As usual I forgot to actually attach the patch I mentioned. So here it is ... regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --dus7xrj6qe3zbayp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xid-assignment-v12-fix.patch" --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7574,6 +7574,19 @@ StartupXLOG(void) LWLockRelease(XidGenLock); } + /* + * Assign subtransaction xids to the top level xid if the + * record has that information. This is required at most + * once per subtransactions. + */ + if (TransactionIdIsValid(xlogreader->toplevel_xid) && + standbyState >= STANDBY_INITIALIZED) + { + Assert(XLogStandbyInfoActive()); + ProcArrayApplyXidAssignment(xlogreader->toplevel_xid, + 1, &record->xl_xid); + } + /* * Before replaying this record, check if this record causes * the current timeline to change. The record is already --dus7xrj6qe3zbayp--