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 1rl1Y0-00H7mZ-Gd for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 07:00:08 +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 1rl1Xy-006Wf6-Pc for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 07:00:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rl1Xy-006Wey-G2 for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 07:00:06 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rl1Xv-004bNR-DP for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 07:00:05 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-513da1c1f26so466520e87.3 for ; Fri, 15 Mar 2024 00:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710486003; x=1711090803; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ts7MDhOvb3bES7Pgax6Y5+9o4Tf/sjyklbelXvi3KDg=; b=YH8lDcjmgpNAgarlOAKC0j0F5oIfsMjG73iVdVLEQgv7WD7T/koF72ALqXp6RfzZRR 3rg9bKFAtRT8e44NrNjYsX19gjN9LO5Mwjx78m+1RNM3F4M5HNS8qmU5hZKQ1PqA6/9F kbra1oHx4OXtx21R0iRZw4vbIPTgOeeJi64VJhPyXhYP3aMODJ/sJeCHOjcpa2N7yvkf Zy5jH8yWSfMTWY/TWP6Qdy3k/DUFgHGo9UsFecb79hu2Wd5vBNqwoSv61ydzYi/LJDMs afzuUme15qpcGMXtgKwlpWLxZFVuW4Z4T5jC0Xd87E5q8UPCwGsIFe4RYPnLdGP7lGiA WWSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710486003; x=1711090803; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ts7MDhOvb3bES7Pgax6Y5+9o4Tf/sjyklbelXvi3KDg=; b=LT4XeQ117Y1iTIxDUNi45xUNaVTQNoKvsCmm3qwxjqKNHSOWGnHCYZYQQopV19gRYG sweA3KD9X+toxPKXfCREyNEesrL3Vn8SRAH3fy8rmtACS5JbaY1qpoHfcyaUHrtOrrNG OZFOYwS8250rgS0r/AV1Z33/FqmqMC9tRDeU25R3LbYJCtRaE6ctjJP7ukoFQZ/3yccH ++ZUyaTH3qJ46T1ufpO6HOA+nYN4fSVDhKqn2tD329ZCFkRD8LqrjI3woI/3NU0nahHd F0tS0TKJ8mZTxEPZ7E5FvVel2VlGqI35vrK352+ykgG/4MJFTIva/q3soQajKDbRYzjg TtcQ== X-Forwarded-Encrypted: i=1; AJvYcCVFeSOcAFwj1ca6fPMohRjEmpElu49FdYyJkj/t6ncwRCZEs+Dn7dMOVho+cioWJyCji3ulhNx20lsatOoYLiE1Yj0P49R0hE+vmXtCIavgDy2z X-Gm-Message-State: AOJu0YzzueVKarzSUqHlr/S98QKZOce60Yb+vdRVHVB0qbMcdCHBxDHh 22iDELP+y/5HOgq4A4N1AQLPia8v5+jhGeZMkHJCI4oh7M8I5/Uq X-Google-Smtp-Source: AGHT+IFpcMLVlka5IVQGE0SzF+8dAYh+U8o+lsE34W6syoOw+2U1rrN4R9I3/NAUUZxayZlWzOoMWA== X-Received: by 2002:a05:6512:3e1e:b0:513:4fb4:5388 with SMTP id i30-20020a0565123e1e00b005134fb45388mr3434851lfv.41.1710486002773; Fri, 15 Mar 2024 00:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.30.186]) by smtp.gmail.com with ESMTPSA id n11-20020a0565120acb00b00513595186e1sm543192lfu.231.2024.03.15.00.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Mar 2024 00:00:02 -0700 (PDT) Message-ID: Date: Fri, 15 Mar 2024 10:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Add the ability to limit the amount of memory that can be allocated to backends. Content-Language: en-US To: "Anton A. Melnikov" , Aleksander Alekseev , "pgsql-hackers@lists.postgresql.org" Cc: Tomas Vondra , Andres Freund , Andrei Lepikhov , Stephen Frost , reid.thompson@crunchydata.com, Arne Roland , vignesh C , Justin Pryzby , Ibrar Ahmed , "stephen.frost" References: <7912c911af51d5cf28c611190bf3d463b9209343.camel@crunchydata.com> <4edafedc0f8acb12a2979088ac1317bd7dd42145.camel@crunchydata.com> <268e0ac7-8a81-4d65-8b40-b62c4b3f1bf9@postgrespro.ru> <48548d40-634b-4943-a737-3c9d95eacf06@postgrespro.ru> <8fcb4406-49f5-4069-b8e9-197a38004ddd@postgrespro.ru> <20231024024435.yaqrajcchcliwhjl@awork3.anarazel.de> <98646b96-6dcf-8d8a-3daf-837f25f8b1e3@enterprisedb.com> <1c5f1856-817d-45e5-8e1a-acd95c6dd335@enterprisedb.com> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Anton, 14.03.2024 23:36, Anton A. Melnikov wrote: > On 13.03.2024 10:41, Anton A. Melnikov wrote: > >> Here is a version updated for the current master. >> > > During patch updating i mistakenly added double counting of deallocatated blocks. > That's why the tests in the patch tester failed. > Fixed it and squashed fix 0002 with 0001. > Here is fixed version. Please try the following with the patches applied: echo "shared_buffers = '1MB' max_total_backend_memory = '10MB'" > /tmp/extra.config CPPFLAGS="-Og" ./configure --enable-tap-tests --enable-debug --enable-cassert ... TEMP_CONFIG=/tmp/extra.config make check It fails for me as follows: ... # postmaster did not respond within 60 seconds, examine ".../src/test/regress/log/postmaster.log" for the reason ... src/test/regress/log/postmaster.log contains: ... TRAP: failed Assert("ret != NULL"), File: "mcxt.c", Line: 1327, PID: 4109270 TRAP: failed Assert("ret != NULL"), File: "mcxt.c", Line: 1327, PID: 4109271 postgres: autovacuum launcher (ExceptionalCondition+0x69)[0x55ce441fcc6e] postgres: autovacuum launcher (palloc0+0x0)[0x55ce4422eb67] postgres: logical replication launcher (ExceptionalCondition+0x69)[0x55ce441fcc6e] postgres: autovacuum launcher (InitDeadLockChecking+0xa6)[0x55ce4408a6f0] postgres: logical replication launcher (palloc0+0x0)[0x55ce4422eb67] postgres: logical replication launcher (InitDeadLockChecking+0x45)[0x55ce4408a68f] postgres: autovacuum launcher (InitProcess+0x600)[0x55ce4409c6f2] postgres: logical replication launcher (InitProcess+0x600)[0x55ce4409c6f2] postgres: autovacuum launcher (+0x44b4e2)[0x55ce43ff24e2] ... grep TRAP src/test/regress/log/postmaster.log | wc -l 445 Best regards, Alexander