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 1rChlT-00GwbY-VL for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2023 15:00:11 +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 1rChlS-00EsHQ-I5 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2023 15: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 1rChlS-00EsHG-8H for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2023 15:00:10 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rChlM-00BOgh-1B for pgsql-hackers@postgresql.org; Mon, 11 Dec 2023 15:00:09 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50c222a022dso4758185e87.1 for ; Mon, 11 Dec 2023 07:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702306803; x=1702911603; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=70eRSEyvHgVmWTWPOOF8wWI0AKbWKlT2TqQ4fRBx+a0=; b=OCwWX5/AluScXqtwapWKIdxXbwfVvDIIDDwWaHJ8XzTDioRzlZgQyLOj4vbfuq3cLB 3sK4CDrXSi07E4MHLFsNLLILY/DkGBMAZfJamFhbS1lWckqoFAZX7TSAeNqawCWiOD/w vCFO8Z5h1R1iurkb92gisVHou60upL+zQeX2MogThuOy8/48r8SxQqOVO41L7x+RweyJ PP0pBqZWqSlMH3C5cTRbUBwTPObZh946EUd1LiTYjvnas2dYldEjUbnyodpQJokNJmPc T/z7qUFykutyW9msdLgbMi0MqyZfVJFU/EATkVkku4w0y5lbG/6yeKiVfXln1OOBWFdC siyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702306803; x=1702911603; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=70eRSEyvHgVmWTWPOOF8wWI0AKbWKlT2TqQ4fRBx+a0=; b=N6obK+QNjMzq80PCE+8NA8OnYaEyH5ajwUNTfVBhlSISbWKYn6S1yYkTDoMxoo4AHH dbTptlkpEt/h1fUKx3RPdnfJXq+Nl102MgXuk3OYJgAl+PJAL0+HTX4SWXvirUzIFyjB +LmaOGx2QTudRej8I9O6VyoN/uoG25pgI0nRXDdq51QgD6U9Gf8bqhcfvCAxd/rPXVDl FpmspXYPfxO0yL4zXBE23aWG0vy62kpW2/SvKGjkC+i9ScZqdSA0XPMCWxr0ty3xTS0c 1o8c3ueAwrnCx4JMSz8fikIAMehpY+53DPanMsQPw9uAKuLGvcHmzoeSaKz2tugiiLp6 UemQ== X-Gm-Message-State: AOJu0Yy3JRxNWoJmVq4tg7BtwiR297d77cMxtax0aPxPg9Hfa8o4VlWl BnKKTMlZ3apxfmSBhzNGuO2UyErtakso3g== X-Google-Smtp-Source: AGHT+IENBE1NwtHixLNORA8wAIEN6WsPeuuEpYVGqoTiyX4yuG+uN82yBuBwQGWT5oShTPe7KtmfZw== X-Received: by 2002:ac2:4847:0:b0:50b:d764:8826 with SMTP id 7-20020ac24847000000b0050bd7648826mr1894937lfy.114.1702306802670; Mon, 11 Dec 2023 07:00:02 -0800 (PST) Received: from [1.0.0.7] ([178.155.25.25]) by smtp.gmail.com with ESMTPSA id d12-20020a0565123d0c00b0050d12f0bba6sm1066614lfv.97.2023.12.11.07.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Dec 2023 07:00:02 -0800 (PST) Message-ID: <40fd0768-b389-a4de-efdf-207343aacc98@gmail.com> Date: Mon, 11 Dec 2023 18: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: brininsert optimization opportunity To: Tomas Vondra , Soumyadeep Chakraborty , Matthias van de Meent Cc: Alvaro Herrera , pgsql-hackers , Ashwin Agrawal References: <20230704112358.bkm6r3fxp275m4lu@alvherre.pgsql> <2b672382-c0b3-3f44-b72c-86b1077b082b@enterprisedb.com> <11f78627-a934-1f8b-084e-21ed95f2564c@enterprisedb.com> <35e7be37-0d35-d8ea-a4d5-eff84aefcc39@enterprisedb.com> <1d68ef1d-41c5-7159-c6c0-b44dad4e3148@enterprisedb.com> <12d42882-7860-9b46-7572-3b2fae6c916f@enterprisedb.com> Content-Language: en-US From: Alexander Lakhin In-Reply-To: <12d42882-7860-9b46-7572-3b2fae6c916f@enterprisedb.com> 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 Tomas and Soumyadeep, 25.11.2023 23:06, Tomas Vondra wrote: > I've done a bit more cleanup on the last version of the patch (renamed > the fields to start with bis_ as agreed, rephrased the comments / docs / > commit message a bit) and pushed. Please look at a query, which produces warnings similar to the ones observed upthread: CREATE TABLE t(a INT); INSERT INTO t SELECT x FROM generate_series(1,10000) x; CREATE INDEX idx ON t USING brin (a); REINDEX index CONCURRENTLY idx; WARNING:  resource was not closed: [1863] (rel=base/16384/16389, blockNum=1, flags=0x93800000, refcount=1 1) WARNING:  resource was not closed: [1862] (rel=base/16384/16389, blockNum=0, flags=0x93800000, refcount=1 1) The first bad commit for this anomaly is c1ec02be1. May be you would also want to fix in passing some typos/inconsistencies introduced with recent brin-related commits: s/bs_blkno/bt_blkno/ s/emptry/empty/ s/firt/first/ s/indexinsertcleanup/aminsertcleanup/ s/ maxRange/ nextRange/ s/paga /page / Best regards, Alexander