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 1gukdb-0001NE-J7 for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Feb 2019 21:03:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gukdZ-0001yd-DA for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Feb 2019 21:03:09 +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 1gukdY-0001yV-Uk for pgsql-hackers@lists.postgresql.org; Fri, 15 Feb 2019 21:03:09 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gukdQ-0002SI-Kv for pgsql-hackers@lists.postgresql.org; Fri, 15 Feb 2019 21:03:07 +0000 Received: by mail-qt1-x844.google.com with SMTP id y4so12489109qtc.10 for ; Fri, 15 Feb 2019 13:03:00 -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=3bFADsKGneAbx09ipdi3Diu/037FUWMMF/YewXJzTQk=; b=YnG9MtjWXjwauEql0cWVFkD/17qLYrhuWKw5aqAEihaANqdyOIrT2XaSFsiO0qldXV gFxMU7zrZbvulkeuv0yJG6R7BXaaI47mGqr3VTWyGl//LiEV9Uee/eMqwiwo9ENjcorx MrP0ucV6VRJRGN9d2ZpOSw4DioCmGATWUk1SrR2mE/Wvl3PybjR8FCDCFLva2K2soWHp 5s/WVPyHCr0d/80hMgg4FoFYS21+lkT5iTRDVblsbE8bmgfLx+GkwG6W4FnhmlsFFlt0 EPQksnZP7Xjhvppm/cGmrBqW9q8TUWeJTRqmngOsJAaHi+aP2Udc0orzmEWiL0MYIvfh /aGg== 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=3bFADsKGneAbx09ipdi3Diu/037FUWMMF/YewXJzTQk=; b=KIg4Y0QHESgWh4inu0gQki1UcwgsdFbfpnBXdQWhtpiwH8eBfvLxbulOClRjfkhzSp bXhOmjqNkPrS+STB2M2W+ww8KSfntBaLshhwr06bEA6NKcV5LcBpNxULFEDJytFoWSDg YhJ5whrHPTcFMlDe4Zvf77+I7YDzslKT0eXfilw+XjL5PrV6VpnMswFesnhi10G5jcE5 HJ84h0dYtjq6fUyoIzBUHlN2rQz6vwV9aBNopihxYh3kX5bHVW8rSbONGd02VhmCHvLd MMrvujUgb4tuLJVrc45ZSqRC/SQ50mW8vK4ltlrXu33BKKU6djON9sKkGbB3ZhGwBAXo /oKQ== X-Gm-Message-State: AHQUAuatmSDtjADyPdAGp+hYgIFfLsjjzC7E9fJLkGIM5N88XLWVpVMm se8FghqX0WhD3a2DjHa/Go/I/LYwr6kcKQ== X-Google-Smtp-Source: AHgI3IaJ5Byuw0oByA2et6USPFdfU4jWTV2r3G52KbTdG8jOr9R3xu8uFBPvZ5fnhZUkC74TNgJTaA== X-Received: by 2002:ac8:3011:: with SMTP id f17mr8987896qte.268.1550264579336; Fri, 15 Feb 2019 13:02:59 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id j68sm3427181qkf.84.2019.02.15.13.02.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 13:02:58 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id D29D5121863; Fri, 15 Feb 2019 18:02:56 -0300 (-03) Date: Fri, 15 Feb 2019 18:02:56 -0300 From: Alvaro Herrera To: Dmitry Dolgov <9erthalion6@gmail.com> Cc: Pg Hackers Subject: Re: propagating replica identity to partitions Message-ID: <20190215210256.GA26815@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. Can you share your reproducer? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services