Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9aq1-0000fk-MN for pgsql-committers@arkaria.postgresql.org; Thu, 28 Mar 2019 19:37:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h9apz-0004Pt-Dj for pgsql-committers@arkaria.postgresql.org; Thu, 28 Mar 2019 19:37:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9apz-0004Pm-24 for pgsql-committers@lists.postgresql.org; Thu, 28 Mar 2019 19:37:19 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9apv-0007le-MK for pgsql-committers@lists.postgresql.org; Thu, 28 Mar 2019 19:37:18 +0000 Received: by mail-wr1-x42b.google.com with SMTP id t17so3647043wrw.13 for ; Thu, 28 Mar 2019 12:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rqndSZAJvE1ElC4u6eIKabgvDaRUbF4GGGk4EF+/zTc=; b=nkRWnbs2GEmZIYtQBuOcfP9KMxWB025xJTbRNqxAeUPZvLRan/et+FZOqKGoPr7mCu qedKnQGb1IgDo5HqQiW8MXjaPVWGVk4oBMFbGNbhQVXBLZpn74C+2/dsdVB8ThwLm27J lJkQuMA1RH/OdSER5OVPftSxwRO0SwIDW2E98Z3LFtYkIRKidd7oB6m/I9nLujkYLgEc woT13RJfpWb7Yn9DvL8sl96ziNBmQ3jwHnmw3grHX3ag26LE2aj7VB4K30MWeuDKwLVp uL9d6ZVCknabB/D1Hsp8qWlCBSxX4uqcwSxqSlSPJ7o3Y4HduGgvsP5+v5wRfY1FD92l 8tQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rqndSZAJvE1ElC4u6eIKabgvDaRUbF4GGGk4EF+/zTc=; b=nLMKJ9CY1G7A+lGc+nLmA1FDgw+Z3C6nyu2hAxQfcZzEBnhjJ4hQLz6uvK5ze3m7R+ C+UisQLXeRir3vwUguiyOD7mQvWc74HXME8h5GOiv1Wg9X78wBtNmJhnNfgC/9YiZYaq 6LjqFfXHwIl5FEdRxkG6O9vf3G8aeWP+fsBBt5J1nh9VMQo0ZUFpccdaO1UKLRfjt3oM tpo3D5lj9oOFKZ9pD1aA/EgypN8qhklDtdBLMpH8KiTVzH4ELyeLVUxLEIqO5KwueE2d 4uxXWSbLN0Orm3Usbg62yd22nKH2Olz3sVXJwZ79zLcPnH5m0MqWhWOdpQlR69iQlb9x vqJA== X-Gm-Message-State: APjAAAX/d5YQmxgx2mDVuwwqfwTIdtaSDIcIqR1tjfIoAwidSiU11Lzi Y2F0PzQqpIFYZYbGN6tyRG7hyYBQ7a1GBA== X-Google-Smtp-Source: APXvYqzAyD0ySoeeD4puWhtggdWXh3LNLY3Dl3gcXFW4AupCIUF2Usz9nq1EZo+bDaB2ZHPFXKpodA== X-Received: by 2002:a5d:6a0b:: with SMTP id m11mr12646387wru.290.1553801833562; Thu, 28 Mar 2019 12:37:13 -0700 (PDT) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id e193sm40019wmg.18.2019.03.28.12.37.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 28 Mar 2019 12:37:12 -0700 (PDT) Date: Thu, 28 Mar 2019 20:37:11 +0100 From: Tomas Vondra To: Peter Geoghegan Cc: Andres Freund , Tomas Vondra , pgsql-committers Subject: Re: pgsql: Add support for multivariate MCV lists Message-ID: <20190328193711.GC16397@development> References: <20190327190406.3gmupkthnbx7lvho@alap3.anarazel.de> <20190327201346.GB21957@development> <20190327203353.GC21957@development> <20190328012752.GD4406@development> <20190328183336.GB16397@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190328183336.GB16397@development> User-Agent: Mutt/1.11.3 (2019-02-01) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Mar 28, 2019 at 07:33:36PM +0100, Tomas Vondra wrote: >On Thu, Mar 28, 2019 at 11:29:12AM -0700, Peter Geoghegan wrote: >>On Wed, Mar 27, 2019 at 6:27 PM Tomas Vondra >> wrote: >>>It's a bit too late for pushing emergency fixes over here, so I'll do >>>more testing tomorrow and then push. >> >>The buildfarm is still almost all-red now. Can you estimate how long >>it will take to push a fix? >> > >Half an hour, at most. I have a fix and I'm running tests on it to make >sure it does break something else. > OK, I've pushed the fix. As explained in the commit message, the deserialization was borked in two ways. Firstly, it was vulnerable to use-after-free. Secondly, the serialization/deserialization of data for by-value types did not work for bigendian systems. I believe this should fix prion (which was tripping on the first issue, due to using -DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE) and at least some of the bigendian boxes (I've tested it on s390x). I do think there's one remaining issue - the deserialized value is allocated as a single chunk, and is then "sliced" into smaller buffers. But the code ignores alignment, which I think may trigger SIGBUS on some platforms - for example grison, skate or gull fail like this, and those are ARMv7 and sparc machines. I do have a fix for that too, but I decided not to push it yet before testing it a bit more. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services