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 1gsTbo-00020d-0x for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Feb 2019 14:27:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gsTbm-00007D-3E for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Feb 2019 14:27:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsTbl-000075-Iv for pgsql-hackers@lists.postgresql.org; Sat, 09 Feb 2019 14:27:53 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsTbd-0007cL-Os for pgsql-hackers@lists.postgresql.org; Sat, 09 Feb 2019 14:27:51 +0000 Received: by mail-qk1-x741.google.com with SMTP id y16so3865348qki.7 for ; Sat, 09 Feb 2019 06:27:45 -0800 (PST) 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:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=1aYBnwBBOSGm3nDzQBxOy924kTOxbwTxS3winJDsRM8=; b=xnegfT71LJML7DIvjFad+qI8ifnH2gqYtQEgKr9TqKNzuSkfvcrQnFRI/akuc9CXrl LqlcQdU79i0c8PrEKUcnmmSO5qy2uuSSOTkXz6QLp8mMnK4l4brztg5im+1TAmxNsrML 8uokFDGcuPdzGW2PQSqZUyQPpupNC6yy36zs0m00Tn2fYaTLWXGVi1piEp6k2D8dVx9S jHxcZbGvoa5k949qvMhvPZVF9lAMeNTIh6EsFc2wBzvlu/2T5jjNLvAnob0NYd25+DBK 8Fd8gTKkcmPTIscaLGG0gPA1P6p+5Dk2/k4FrMnN1p/GfpwPkLjmEPemcc9ApN67jiEX y2QQ== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=1aYBnwBBOSGm3nDzQBxOy924kTOxbwTxS3winJDsRM8=; b=Nugmn02HfbPfdkv/cpaOIk0KlrpNt+5IMypEpf0rCRO3U/y2xb+QGfFTiBLoKaaGjQ Yo4mfneFYWDN/ZHRfbCjlZlF3F1ZjgQUUSaN1ZU031o+6nTg1Z1gchUBpKSWXQBG07b0 9kwXvjktagwVtb86MuhOQTBzNDjN+NUFMHX8ORSpQDNC0Z7xiasyK8syI40aBEd4mR+o qeTYySzKrb2GAndwPCKyjhOwdh5pEebQIsB12+pgAmQGs5Pt0CH0yRt9W8GqTmQ63JZb kYUbnpDQJ6J3eHD+GOreTKtMSVrMx9e3rCrJJNLIEdCA3mFsjHsqfuxVT2Yh/xc0Bp/j sfcA== X-Gm-Message-State: AHQUAua/JtmUJqSralPAu4tmJQml27fMRPoYwazwT/HquRhEEDTczUIC 2ADbiHnBYD5Vbl0//g/tmptJ/w== X-Google-Smtp-Source: AHgI3IbMuQi4B+sbyBZNGSHAplwxnEe1a6uRhcmIq70BJwGf/DtvE3Rw3WucyqtQucNAd4s17UfCgQ== X-Received: by 2002:a37:5647:: with SMTP id k68mr19250866qkb.250.1549722464506; Sat, 09 Feb 2019 06:27:44 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([201.186.80.67]) by smtp.gmail.com with ESMTPSA id a3sm5783997qkd.86.2019.02.09.06.27.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Feb 2019 06:27:44 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id BACDF124634; Sat, 9 Feb 2019 11:27:41 -0300 (-03) Date: Sat, 9 Feb 2019 11:27:41 -0300 From: Alvaro Herrera To: Dmitry Dolgov <9erthalion6@gmail.com> Cc: Pg Hackers Subject: Re: propagating replica identity to partitions Message-ID: <20190209142741.GA8147@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Feb-07, Dmitry Dolgov wrote: > Could there be a race condition somewhere? The idea and the code looks > reasonable, but when I'm testing ALTER TABLE ... REPLICA IDENTITY with this > patch and concurrent partition creation, I've got the following error on ATTACH > PARTITION: > > ERROR: 42P17: replica index does not exist in partition "test373" > LOCATION: MatchReplicaIdentity, tablecmds.c:15018 > > This error seems unstable, other time I've got a deadlock. And I don't observe > this behaviour on the master. Clearly there is a problem somewhere. I'll investigate. Thanks for testing. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services