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 1mvHx6-0006EJ-Tg for pgsql-general@arkaria.postgresql.org; Thu, 09 Dec 2021 11:51:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mvHx5-0003Ag-On for pgsql-general@arkaria.postgresql.org; Thu, 09 Dec 2021 11:51:07 +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 1mvHx5-0003AX-Dx for pgsql-general@lists.postgresql.org; Thu, 09 Dec 2021 11:51:07 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mvHx2-0000cC-SL for pgsql-general@lists.postgresql.org; Thu, 09 Dec 2021 11:51:06 +0000 Received: by mail-wm1-x334.google.com with SMTP id m25-20020a7bcb99000000b0033aa12cdd33so5085801wmi.1 for ; Thu, 09 Dec 2021 03:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=XqFF3pvQOGBBTUFt2m5X08tPxZRKyAbkshu+uAAp9qY=; b=Y5iyJ7QeqhpXiS+v45ZKT11OcDxqJYTnsX1YaDx4A7mLZI/Ndo6z7sm+pppWVTXxiO ACkLHPtpqgNFKe0HWaQHUkSeoOagt//15jRkpFT3vIzKxyigfvVTI5/Xx6Wk93lkymL0 sWycobtsYZPjox3BYirczkPXbfW9GDEEV1PQEgAeD2D9FuXAazr8fRCa7oYFPMZcPKKx gSPCmNb+0LcO3pm0kQ0imHLTDNgR+d1TonJ90zNjB7+u5T7a6Riycn3mEUX+ElTa2AaI Lb1SgWYFqZ90fbeAWwRTfPq/ZHIjTH3V3IEi2yvwfSsYxezETGoANJcXAAyTZmORG5m+ 8UrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=XqFF3pvQOGBBTUFt2m5X08tPxZRKyAbkshu+uAAp9qY=; b=bfD+epPBJxsVV98yVIAvNkuhCPUGy5uWtxTquutZNlxz1H4NT3fCQloVDugYP9IWUk jUth/NS6hLdNG4arWDLOdQ50+50WElsrhD93Enwh4A44LYIBgh3FGPdjHmc7e1Y9PQBl UNor+Hbm13wBzdMQAu1LLUZONMvQBvVWrp+kM3E1EoijvA3GC2ztN7DO1VY8RLZ5FeaQ uapYpCrz1Q44en/sleIsAzyUcsLqLb2v5TnOv2zYH4YLNi6v/BEuCxvImiWf/rkie11z 1IxWrcBYoNlnWXFM+C70rHiI+WswLTE4bh+imsVRsoMqdXYER/30kT3ispY4oP+xzanq oZXg== X-Gm-Message-State: AOAM531+4elrY3olB03wn7XupkwqGsOIPLSdSY/o+4jwJDmw2hTO6Y/8 Nyae2kd6i2Fob8hzwzz8Qs5HmpvktpS9Zg== X-Google-Smtp-Source: ABdhPJyvf4CwP40e4vsS0MsDuJ0cQGoFe5Yel0+y0vlp6UphijRxctaSij5fWsL3lJm662HqTVFxeQ== X-Received: by 2002:a7b:c1d5:: with SMTP id a21mr6647829wmj.14.1639050663356; Thu, 09 Dec 2021 03:51:03 -0800 (PST) Received: from localhost.localdomain (dynamic-eaol7q3yyl1ah8qba-pd01.res.v6.highway.a1.net. [2001:871:5e:1e7c:9500:7fff:fdd8:a036]) by smtp.gmail.com with ESMTPSA id l11sm5442165wrp.61.2021.12.09.03.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 03:51:02 -0800 (PST) Message-ID: Subject: Re: Identity/Serial Column In Subscriber's Tables From: Laurenz Albe To: Avi Weinberg , "pgsql-general@lists.postgresql.org" Date: Thu, 09 Dec 2021 12:51:02 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2021-12-09 at 09:13 +0000, Avi Weinberg wrote: > What is the best practice when dealing with Identity/Serial column in logical replication. > Should the subscriber table have this column also defined as Identity/Serial or have it defined as regular integer? > Is leaving it as Identity/Serial also on subscriber tables, can potentially cause a problem? It does not really matter if you use "serial" or an identity column on the logical standby or not. The sequence on the standby won't be advanced. The best way to prevent conflicts from happening is *not* to modify the data on the standby. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com