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 1s31Vn-008WHR-03 for pgsql-hackers@arkaria.postgresql.org; Fri, 03 May 2024 22:36:14 +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 1s31Vk-00Cisj-8x for pgsql-hackers@arkaria.postgresql.org; Fri, 03 May 2024 22:36:13 +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 1s31Vj-00Cisa-NR for pgsql-hackers@lists.postgresql.org; Fri, 03 May 2024 22:36:12 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s31Vg-001JAb-9j for pgsql-hackers@lists.postgresql.org; Fri, 03 May 2024 22:36:11 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-5ad2da2196bso97238eaf.3 for ; Fri, 03 May 2024 15:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; t=1714775767; x=1715380567; darn=lists.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=6il0/MVvBVEGwlsqRazHO+PVL1Jz8XLVzYo/EYzHSD8=; b=gvamWfl1uYGX5V/TEch5mrfq/UTOkbXLlj+r+eRgodrGZGl5e83lSIaLJKJ6RXybOL vgs/2PTQQlfO4CZBxfVe7EL/8TdEHWtg4bTe9QBX10Z3O3HOq22Fqe1nLDTdhRUmo/+c 5/dXkiJElVbmd5UuT7cbi4SoS+oZoebqjMn5bWyUUZF5eirh6K1H+kh/bCgtrdriyu+j 7ikp+3B3DJTEasD3lfMSF0NNqvGWrI+Xwrdt7hjQGnhNktp0pUi/UymEY+i2ibPcAD8S sh9ErfYfrHxxZa565IA2ro3IqzTeBLmB3Tt6L6qGx9RW7bBGULm3mpuj5COFwJnnzKnJ 7wHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714775767; x=1715380567; 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=6il0/MVvBVEGwlsqRazHO+PVL1Jz8XLVzYo/EYzHSD8=; b=IUx54dxOLegMPk8zzt4SFLlda9r+nYs6VkY1K1+7o8x4EjQkPOLR1RR/+h5asImwEw 0C8Q/RaFdyzerOy9TYn1EKBQ4nO/69NRlJQXJzaVTPHN8+8X7Jc6rJKVC4duNFMXXUso s77j+wV/NIre/aJAZ8MKzA2GMt6MYsBLsGa6G3mlgB3Js3LhbWMIS17loBTGbXsmKJ66 Xr2TiVYJTgOZBvVI6aGXu14yVADnTi8WrqttksUaqXGSyjDJdxRMz1ugczhhIRzEYeWn KVDg6b8R6HQ5yRGVggJyVo+JT/nzkCM9YQz/u7XLJ6bq89W6UFAJGqGFR2fD4ho/VtPO N4aw== X-Forwarded-Encrypted: i=1; AJvYcCUbXw3lQmSUZGJU44yv1TXdova/C99eK31QDKIssso3sB8ngN2ZK/YkipxcKdBhKbCjuCF4qGd8QEXf3H2S3rXHPod0hJYfJSt8jEDAhpJ2q1D+ X-Gm-Message-State: AOJu0Yyjt1E9EpdcxsZd9/lwF5oqgcag76ROYtnmG+h+N05qMDG4pano zlNIJUjhGJn7O/dpBDpLESjnHHaejngM8gWyDrzVj8lqaTMlhKSSCvzGpRsI11M= X-Google-Smtp-Source: AGHT+IH9sftRQyb9H51K+nVyBKrOniaRrN1ndztXYf6WKQRl+xxOuJcBPBLmgR21z0vu2cJBEontxw== X-Received: by 2002:a4a:988f:0:b0:5b1:b8a4:f9ea with SMTP id a15-20020a4a988f000000b005b1b8a4f9eamr4550234ooj.7.1714775767249; Fri, 03 May 2024 15:36:07 -0700 (PDT) Received: from [172.26.43.131] ([136.226.102.203]) by smtp.gmail.com with ESMTPSA id bk4-20020a056820190400b005acb0e90e39sm840108oob.28.2024.05.03.15.36.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 May 2024 15:36:06 -0700 (PDT) Message-ID: <362570f3-1031-4f8e-a077-81c103200b64@joeconway.com> Date: Fri, 3 May 2024 15:36:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation To: Peter Eisentraut , Tom Lane Cc: Alexander Korotkov , "Guo, Adam" , "pgsql-hackers@lists.postgresql.org" , Nathan Bossart , Masahiko Sawada , Jim Mlodgenski References: <3335675.1713884256@sss.pgh.pa.us> <1685377.1714496091@sss.pgh.pa.us> <1696557.1714498172@sss.pgh.pa.us> <2652929.1714745623@sss.pgh.pa.us> <3846ef0f-5273-41aa-a77e-f92841e0515f@eisentraut.org> Content-Language: en-US From: Joe Conway In-Reply-To: <3846ef0f-5273-41aa-a77e-f92841e0515f@eisentraut.org> 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 5/3/24 11:44, Peter Eisentraut wrote: > On 03.05.24 16:13, Tom Lane wrote: >> Peter Eisentraut writes: >>> On 30.04.24 19:29, Tom Lane wrote: >>>> Also, the bigger picture here is the seeming assumption that "if >>>> we change pg_trgm then it will be safe to replicate from x86 to >>>> arm".  I don't believe that that's a good idea and I'm unwilling >>>> to promise that it will work, regardless of what we do about >>>> char signedness.  That being the case, I don't want to invest a >>>> lot of effort in the signedness issue.  Option (1) is clearly >>>> a small change with little if any risk of future breakage. >> >>> But note that option 1 would prevent some replication that is currently >>> working. >> >> The point of this thread though is that it's working only for small >> values of "work".  People are rightfully unhappy if it seems to work >> and then later they get bitten by compatibility problems. >> >> Treating char signedness as a machine property in pg_control would >> signal that we don't intend to make it work, and would ensure that >> even the most minimal testing would find out that it doesn't work. >> >> If we do not do that, it seems to me we have to buy into making >> it work.  That would mean dealing with the consequences of an >> incompatible change in pg_trgm indexes, and then going through >> the same dance again the next time(s) similar problems are found. > > Yes, that is understood.  But anecdotally, replicating between x86-64 arm64 is > occasionally used for upgrades or migrations.  In practice, this appears to have > mostly worked.  If we now discover that it won't work with certain index > extension modules, it's usable for most users. Even if we say, you have to > reindex everything afterwards, it's probably still useful for these scenarios. +1 I have heard similar anecdotes, and the reported experience goes even further -- many such upgrade/migration uses, with exceedingly rare reported failures. -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com