Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qGchT-0005eY-DG for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Jul 2023 09:51:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qGchR-0007hV-5j for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Jul 2023 09:51:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qGchQ-0007hM-Qu for pgsql-hackers@lists.postgresql.org; Tue, 04 Jul 2023 09:51:56 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qGchN-001y2O-V5 for pgsql-hackers@lists.postgresql.org; Tue, 04 Jul 2023 09:51:55 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1b049163c93so3585694fac.3 for ; Tue, 04 Jul 2023 02:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688464313; x=1691056313; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fYf4G4y4w9Xsz+r9zayzaelWBRmQ866/h3mRSVi7k1Q=; b=TL804gZg7ALmEI0f3atBq+ScFRDPLk3PkeEFXLJnF7n2qhgDZl/pFasCsrLgH0dZkX GosC/qYfVr3VJRJz8oD/2RVvbxT2rBhM7FS93qqxVNProoZjLjA6QPWjMyT/HJxNZ826 6rnTswGXwqB+4M0wrs9kGHbV0jrOKNq5X09+2/cQjLo2y2agwVXqs2JPIxF3AVcy7GPL u9E6c0HMnO0WKYsdiFdfaarxtUv/jtJ1jNwG1yjwaax+KOVDcyPG0usZ/YwhhtPrlx4X S9GNnUH2rGmVXDEDmah9M0SGVcojqbYtctipMWQxQjf/wZTvIoe3lBlbrY1NfKcDsMHm rBDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688464313; x=1691056313; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fYf4G4y4w9Xsz+r9zayzaelWBRmQ866/h3mRSVi7k1Q=; b=TNu4uByElc9zUg1XPu9giRiOtMsQz9PQeEsFHfTBR4UQWgWVgXRsg2V2p7cN3Ga9HN sk7w4YiUMalpR5nYQyhF9k4QKmbUMGLuTCpDolqqoNHD56hX8djusfgIx4okFevEz+TI gqngfmY9R/XuJRWCdsP+dXeS8NG1mh789fWPJEvfK7a4F3VRtk541yf8xwcH+ltl99kp eGwDa+nFnT4OtVhZMSVzDtGP+AqCFp1lenSypgGEtyFSQ0Mc5D28OlnPrjDFzWpWDXpC w7mrGtHdqE4tmbS6RktbwiDlHz8J8V2tOQhfHTw6jjfxL+S4K3DbaE0/mjpoAtzC11xA k6ew== X-Gm-Message-State: AC+VfDz7AW9OVwIpeMau+BwZvSnVfl3wBUY8eSRj1zFGZXDo/QLC8uKW sKPA7zGzfvsYuvXaP+b2Km3tLz7k4mTc85yAG4k= X-Google-Smtp-Source: ACHHUZ6+xXeBekhNfwOI05pemMT6flZFmQHqrMKP8sqvtg3M92w4UYKHyUo6mZabqCwV4uT0YWtLCbnvnEuGOowQkiE= X-Received: by 2002:a05:6808:190d:b0:39a:bc60:adf9 with SMTP id bf13-20020a056808190d00b0039abc60adf9mr10434575oib.7.1688464313087; Tue, 04 Jul 2023 02:51:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Tue, 4 Jul 2023 15:21:35 +0530 Message-ID: Subject: Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table. To: Masahiko Sawada Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 3, 2023 at 7:45=E2=80=AFAM Masahiko Sawada wrote: > > Commit 89e46da5e5 allowed us to use indexes for searching on REPLICA > IDENTITY FULL tables. The documentation explains: > > When replica identity full is specified, > indexes can be used on the subscriber side for searching the rows. Candi= date > indexes must be btree, non-partial, and have at least one column referenc= e > (i.e. cannot consist of only expressions). > > To be exact, IIUC the column reference must be on the leftmost column > of indexes. Does it make sense to mention that? > Yeah, I think it is good to mention that. Accordingly, the comments atop build_replindex_scan_key(), FindUsableIndexForReplicaIdentityFull(), IsIndexOnlyOnExpression() should also be adjusted. --=20 With Regards, Amit Kapila.