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 1rrzHn-0043aJ-SN for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Apr 2024 12:00:12 +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 1rrzHm-0017iK-5P for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Apr 2024 12:00:10 +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 1rrzHl-0017iC-S4 for pgsql-hackers@lists.postgresql.org; Wed, 03 Apr 2024 12:00:09 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rrzHg-000Psn-OV for pgsql-hackers@lists.postgresql.org; Wed, 03 Apr 2024 12:00:09 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-513da1c1f26so7562488e87.3 for ; Wed, 03 Apr 2024 05:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712145603; x=1712750403; 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=Tldgly2vOOq/p+zfUd/epaa4abwJgeTmHfO449z7tVE=; b=lZO3ow6YW0+9+BNqoD5LihsV5A9shLPxIR/aj8zubuzSVemfI+omgQcMY7qNsYOnNB 4+zTYBzL7mtnOWG+UQRZuHqqiqI+gQTqhwHSeGb3uh78Ww1u8AH1rQMLH6L+4Zfaxef3 1NetF1S5cuMnwPG9nXWLiGa+rFxkJ51Sct/Hua1hv64pM6njDqJ1tu92xsK8w94ZqnYp uTtbvM/THALT6Cq/3c4y8h20esPmG4j1s9sbzNjAPZgv6ULYWKRokJ/9VJB1A4Pd+e++ rXejGB7hmiDxrtXTOIv65T87M07sL/OJlrjWSSTkWA33+9KjNrJYyrMslxL2kOE1hqQM jLxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712145603; x=1712750403; 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=Tldgly2vOOq/p+zfUd/epaa4abwJgeTmHfO449z7tVE=; b=ZjejbCc64sAf95eY48+OJ0igHg5oHucPtlnEfSjvZn2vkb3ogmMUuGFfCQOoOVIpsD N7H16zndoVCcQPiPFic4kuy0GtNmF8uukv9LKD0jkUAEEKSmwpHlqBsrD8E+zKoEos2U +VNEJJ+Byyj/oyl0jRj1GkiTX4tM3XChHclcRT3Sr8QxBtb/JqzblVH3o5GFODEDslQZ ytUndeDjrcFda4e+ePdg5ZdXlEqVANqp1bai6AY4xplaSxTKE1sF5xKXSnLGnlZWmifz aY4eqwj7J4DHXJtA9rEVJ7pk3g8kgAAmQ5OggxJzp8BSbesisxJi/9Ry9pgBfUJfGj0I 2muw== X-Forwarded-Encrypted: i=1; AJvYcCXa/sl0TPkT2rPrbxEpLKhvJTv08fpPA/YY2RfyBsunEvILxqcrIzfE1bHkRnsXxVXCid3ppRhBwMSBTCvaKAN+cZu+QFImqLIT6YCkicvBi4AR X-Gm-Message-State: AOJu0YwuCSeDN1lo7epi6U2Z2gZvniSPotavCd+k0ROlScBlF/XK+6Ng uVsWXYuckIKzM4Ec9oiZIpTgjQ134kDAe4af4AraqdJKwD0BfFAA X-Google-Smtp-Source: AGHT+IHwRqzrVtGBsL7v1zJXEm5ZSDsdr8FBQOTccurJ7MBHVLvHq+ugvGZOcyIOiQ+J/kdfs047NQ== X-Received: by 2002:ac2:4c05:0:b0:516:a517:f26d with SMTP id t5-20020ac24c05000000b00516a517f26dmr1548011lfq.9.1712145602765; Wed, 03 Apr 2024 05:00:02 -0700 (PDT) Received: from [1.0.0.7] ([91.185.77.120]) by smtp.gmail.com with ESMTPSA id g19-20020a056512119300b00513ddd1760fsm2012892lfr.122.2024.04.03.05.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Apr 2024 05:00:02 -0700 (PDT) Message-ID: <2a25eaf4-a3a4-5fd1-6241-9d7c73142085@gmail.com> Date: Wed, 3 Apr 2024 15: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: SLRU optimization - configurable buffer pool and partitioning the SLRU lock Content-Language: en-US To: Alvaro Herrera , "Andrey M. Borodin" Cc: Dilip Kumar , tender wang , PostgreSQL Hackers , Tomas Vondra References: <202402271733.43375fmfpr2f@alvherre.pgsql> From: Alexander Lakhin In-Reply-To: <202402271733.43375fmfpr2f@alvherre.pgsql> 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 Hello Alvaro, 27.02.2024 20:33, Alvaro Herrera wrote: > Here's the complete set, with these two names using the singular. > I've managed to trigger an assert added by 53c2a97a9. Please try the following script against a server compiled with -DTEST_SUMMARIZE_SERIAL (initially I observed this failure without the define, it just simplifies reproducing...): # initdb & start ... createdb test echo " SELECT pg_current_xact_id() AS tx \gset SELECT format('CREATE TABLE t%s(i int)', g)   FROM generate_series(1, 1022 - :tx) g \gexec BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; SELECT pg_current_xact_id(); SELECT pg_sleep(5); " | psql test & echo " SELECT pg_sleep(1); BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; SELECT 1 INTO a; COMMIT; BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; SELECT 2 INTO b; " | psql test It fails for me with the following stack trace: TRAP: failed Assert("LWLockHeldByMeInMode(SimpleLruGetBankLock(ctl, pageno), LW_EXCLUSIVE)"), File: "slru.c", Line: 366, PID: 21711 ExceptionalCondition at assert.c:52:13 SimpleLruZeroPage at slru.c:369:11 SerialAdd at predicate.c:921:20 SummarizeOldestCommittedSxact at predicate.c:1521:2 GetSerializableTransactionSnapshotInt at predicate.c:1787:16 GetSerializableTransactionSnapshot at predicate.c:1691:1 GetTransactionSnapshot at snapmgr.c:264:21 exec_simple_query at postgres.c:1162:4 ... Best regards, Alexander