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 1qGebM-0003dp-Vb for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jul 2023 11:53:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qGebL-0005GF-RY for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jul 2023 11:53:47 +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 1qGebL-0005G5-Jc for pgsql-bugs@lists.postgresql.org; Tue, 04 Jul 2023 11:53:47 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qGebJ-0028os-AE for pgsql-bugs@postgresql.org; Tue, 04 Jul 2023 11:53:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PAb3ezM6yvqp4oLvQfrPvXK5buoE+35l3tQ9ezun77w=; b=hH5KiwRW7JVKQvP6DiqZZZ+xe8 WHTvEp9QHbXw0P3DqmOYtKblyZeT4fEYkm1/V3uzxzzjvQIeDpOMSBHaF5iTXzsFfwQLjq7PNZTH8 1fG8V53kACXYU2Mto+76LbyFGYqqO1TwIANCJDdS3rw8cYz2uvhHSUQ/ne1xkQpY+q3w=; Received: from depesz by depesz.com with local (Exim 4.94.2) (envelope-from ) id 1qGebH-006Y2T-Ph; Tue, 04 Jul 2023 13:53:43 +0200 Date: Tue, 4 Jul 2023 13:53:43 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Tomas Vondra Cc: pgsql-bugs mailing list Subject: Re: Backend handling replication slot stuck using 100% cpu, unkillable Message-ID: Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 04, 2023 at 01:30:21PM +0200, Tomas Vondra wrote: > On 7/3/23 14:58, hubert depesz lubaczewski wrote: > So is it an infinite loop in ReorderBufferExecuteInvalidations, or is it > just the case that there are many invalidations? I can't really deduce > that from the backtraces. > > How many invalidations does the transaction have? Should be enough to > > print txn->ninvalidations > > Also, is there anything interesting about the transaction? You know the > XID (2741814901) so maybe use pg_waldump to see what it did. I don't have the process anymore. Pg was restarted, and the app was forced to not take data from this place. I can run pg_waldump, no problem, but I'm not an expert on this. Which wal file(s) should I try to dump? and what to look for (or should I just provide full output of dump? Best regards, depesz