Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6aLY-001VN4-D6 for pgsql-general@arkaria.postgresql.org; Fri, 24 Nov 2023 17:52:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r6aLW-00DU5H-11 for pgsql-general@arkaria.postgresql.org; Fri, 24 Nov 2023 17:52:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6aLU-00DU58-8b for pgsql-general@lists.postgresql.org; Fri, 24 Nov 2023 17:52:05 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6aLP-008KV6-JP for pgsql-general@postgresql.org; Fri, 24 Nov 2023 17:52:03 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 6D2585C0152; Fri, 24 Nov 2023 12:51:57 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 24 Nov 2023 12:51:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1700848317; x=1700934717; bh=ly4Hs8xtJ8R8Ys1xSqdZl96ZH4Q4ardQdi0 WkWVFtFI=; b=RKg8RHMmYv8bQZ0uECnvtKgZUrygB6xUbtvx+DjxpqEzL8Kmrgz tbTA0xlCksaZoCFTwlzlswRUQ1jg+uXH0eqt9XlMdYArAbVx9yyoGB+hYeqr7Z9D Ng3LhOZ8qwsPDlLImfOOwL7y5rsvrV8Deyf/Lr+zO2ttBdHAYekcopLyIInV8HFB aU07kgkZjQjP7xZIMiEK7fsPSsDwiLl2tO66TQtxZ2UGMBi4ymkhXAQ/3RUPqmuF uY7aRkufczjfn21raXDdjU9wiEpzPm64PfbIV8t2LcbsBC3fQ2Y/G3kGSzOedKY3 Aq32heiSINfcf5AUtew0wBa31e/nW66u4kQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700848317; x=1700934717; bh=ly4Hs8xtJ8R8Ys1xSqdZl96ZH4Q4ardQdi0 WkWVFtFI=; b=K3tg3o0fpzk0yZE/6qsCzJeXZYjENN3gHm/ii5V8o+KTifv5fpQ 1B1u4zH5MJENUHq4Py3ZiGvhGiqKsS7+nBdb8OkctU9Zv4l3MQCLBKEwhv5upD4S MsivO8D3HKvNeUTphCLEuSMobYTHbOaq/W77/UAn/yrThFHizxNQYpxeU68pkqF8 2W4oIbh4VCC5XMP/JqjhB+VOuhTbwylYtqEaLeiLl65QAn925uN0i1WMNNm5rp7X /b+Cx3bguqMd5WxuK1aiRwrGzviezvsxvDgVH6rtPB5l/kouXThdQ5uO0BghsHln lm+r6rrOzChooFlxr/hmW36YHP5TIprWmSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehhedguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhevhfgjtgfgse htkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghn rdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepffevhe fggfdtgfefvddtjeetteegtddtueejhfelieejheeitdejgefggeeiudfgnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklh grvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Nov 2023 12:51:56 -0500 (EST) Message-ID: <430d83f0-65ff-47b0-9600-26094099fc17@aklaver.com> Date: Fri, 24 Nov 2023 09:51:55 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: replication primary writting infinite number of WAL files Content-Language: en-US To: Les References: <38f7d87c-ae22-48e8-a4c4-0acde1ad6eb9@aklaver.com> Cc: pgsql-general From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/24/23 09:32, Les wrote: Please Reply All to include list Ccing list to get information back there. > > > Adrian Klaver > (2023. nov. 24., P, 17:50): > > On 11/24/23 03:39, Les wrote: > > The only exception is a sequence > > value that was moved millions of steps within a single minute. Of > > Did you determine this by looking at select * from some_seq? > > > select dd, (select max(id) from some_frequently_changed_table where > created < dd) as id > FROM generate_series >         ( '2023-11-24 10:50'::timestamp >         , '2023-11-22 10:30'::timestamp >         , '-1 minute'::interval) dd >         ; > > Here is a fragment from the first occasion: > > 2023-11-24 10:31:00.000|182920700600| > 2023-11-24 10:30:00.000|182920700500| > 2023-11-24 10:29:00.000|182920699900| > 2023-11-24 10:28:00.000|182920699900| > 2023-11-24 10:27:00.000|182920699900| > 2023-11-24 10:26:00.000|182920663400| > 2023-11-24 10:25:00.000|182920663400| > 2023-11-24 10:24:00.000|176038405400| > 2023-11-24 10:23:00.000|176038405400| > 2023-11-24 10:22:00.000|176038405400| > 2023-11-24 10:21:00.000|176038405400| > 2023-11-24 10:20:00.000|169819538300| > 2023-11-24 10:19:00.000|169819538300| > 2023-11-24 10:18:00.000|169819538300| > 2023-11-24 10:17:00.000|167912236800| > 2023-11-24 10:16:00.000|164226477100| > 2023-11-24 10:15:00.000|164226477100| > 2023-11-24 10:14:00.000|153516704200| > 2023-11-24 10:13:00.000|153516704200| > 2023-11-24 10:12:00.000|153516704200| > 2023-11-24 10:11:00.000|153516704200| > 2023-11-24 10:10:00.000|153516704200| > 2023-11-24 10:09:00.000|144613764500| > 2023-11-24 10:08:00.000|144613764500| > 2023-11-24 10:07:00.000|144613764500| > 2023-11-24 10:06:00.000|144613764500| > 2023-11-24 10:05:00.000|144312488400| > > Sequence is incremented by 100,  so for example, between 2023-11-24 > 10:20:00 and 2023-11-24 10:21:00 it went up 62188671 steps. I think it > is not possible to insert 62188671 rows into a table. A psql function > might be able to increment a sequence 62M times / minute, I'm not sure. > > On the second occasion, there these were the biggest: > > dd                     |id          | > -----------------------+------------+ > 2023-11-24 10:50:00.000|182921196400| > 2023-11-24 10:49:00.000|182921196400| > 2023-11-24 10:48:00.000|182921196400| > 2023-11-24 10:47:00.000|182921196400| > 2023-11-24 10:46:00.000|182921192500| > 2023-11-24 10:45:00.000|182921192500| > 2023-11-24 10:44:00.000|182921192500| > 2023-11-24 10:43:00.000|182921191900| > 2023-11-24 10:42:00.000|182921191300| > 2023-11-24 10:41:00.000|182921189900| > 2023-11-24 10:40:00.000|182921189900| > 2023-11-24 10:39:00.000|182921188100| > 2023-11-24 10:38:00.000|182921188100| > 2023-11-24 10:37:00.000|182921188100| > 2023-11-24 10:36:00.000|182921188100| > 2023-11-24 10:35:00.000|182920838600| > 2023-11-24 10:34:00.000|182920838600| > 2023-11-24 10:33:00.000|182920838600| > 2023-11-24 10:32:00.000|182920838600| > 2023-11-24 10:31:00.000|182920700600| > 2023-11-24 10:30:00.000|182920700500| > > > > Are the servers open to the world and if so have you explored whether > there has been an intrusion? > > They are not open to the world. We did not see any sign of intrusion, > but of course this is possible. > > We are using dev databases that are created from snapshots of the > standby. There is a possibility that a dev database instance (created > from a snapshot of the standby) might have connected the primary just > before it was reconfigured to be standalone. Can this be a problem? > > > Do you have logs that cover the period from when it transitioned from > working normally to going haywire? > > Yes. That log only contains messages saying that "checkpoints are > happening too frequently", nothing else. > > > > > You are using repmgr which as I understand it uses streaming not > logical > replication. > > Yes, we are using streaming replication. -- Adrian Klaver adrian.klaver@aklaver.com