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 1uUjMf-007iLJ-J0 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jun 2025 09:57:53 +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 1uUjMd-00Agh0-BH for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jun 2025 09:57:51 +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 1uUjMc-00Aggr-U3 for pgsql-hackers@lists.postgresql.org; Thu, 26 Jun 2025 09:57:51 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uUjMb-0045Dy-2w for pgsql-hackers@lists.postgresql.org; Thu, 26 Jun 2025 09:57:50 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-b34c068faf8so811554a12.2 for ; Thu, 26 Jun 2025 02:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750931868; x=1751536668; darn=lists.postgresql.org; 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=tjsT2YXPoHGIBDsfgGzhwoZ+edn0s5+lE3Au7Pw5YEw=; b=ao8YFV5QWZAGd56BCeewcjNuemMkdpXAwFZNYvzcMqp96MnZkBhKicD/dHCDqU9Z0z bEFP3g/wzXim08PrYhFeiFZ4MnSI9T9KDJCV6pO0mtq32bRdzBc5SKkuSgJQOJMjeCmV jj+L2wtUX5eZE2LYKVh70bGWGBDS/J3iz0BTSv9k/IOM9D+7GFe21EXvEkUgBRZBpH+Q 033cG8VY75i+d4kJ+IIp6yX7q1zeaTuG1YFbEv8PgOsHTro5eFfBNDchsojeOdp+4fVA 1BGA7uZah+Rd5yw3TOk1GtdQsLMy/eCPAr8MxZE3XW+ktJwDDkpgBdyfVHsQGaH9ArIc HRiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750931868; x=1751536668; 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=tjsT2YXPoHGIBDsfgGzhwoZ+edn0s5+lE3Au7Pw5YEw=; b=ueb0jdV4uC/senrgk6yYKVjyH4WMyTiYwd6fYdJtIod5HkF+duhpASDEUIZjyeQqRT M1XphGcL3cHs/qMmY73Mk0FT1e+lmNNMj0WhS5F23YoQ+tbSdcH1w+f2fa9rlWcrkRqj U80nxDroEqkPTNMhM916vXiFYKz7c78rHFSWXmaDaDQ5gujNSmYm2OVXvu4rPiJnHsVA 6RFVlSZv1TWAOddCCrMbKYOemkJbPZQxI2MyuefzDaVmQ+CMGlILCFfMsCCaTRIzqybO D8Knlic2WbLlmhahpm9xrFn71SHcc0EpFTexzzr3250zR8BZjOh5x8sMp5L6/27aFKMg E8ew== X-Forwarded-Encrypted: i=1; AJvYcCVbCOliQte1YG0kjL8CHggGiFcvyEaX9RfFKD+tk+w7iap/XSt5UARiRCuE7fLVeHiZof/jHtNlt/aZsx21@lists.postgresql.org X-Gm-Message-State: AOJu0YxEKDcpDt7/whM1YUkiE7rrxlejKTHahlqubaM2EH37MlZDj6sw L4sVA3NtEJEwg8NQYv0cqGw4TP7G7uiyfjoDtIYeqL68Tp7kzPt2YvOKi6K7hTRon/YsqQC45zT vMOxDtiyd7gTjdegCsGoqaON2A5lq/1Q= X-Gm-Gg: ASbGnctCr4nWP5h7un7CVGml1YfT6l2eT/Sg6Rn/mQliElcFDDVVydSs1BB7/g8FIbj TWW/Ge7IntEhZ92ZjPk5sBqQiRLId3sl0l8j+u50uUQmHfe1S1DRpLkpW+psBxUWPFr/u2wOf8S KYjW4F8ks6KzAg1j+0rEmVm9dqHZ82oHh0R9zJLMh6raDKSA== X-Google-Smtp-Source: AGHT+IF5FqERBNYpUd/9zjiFWaBVnTsTeFpaPIBu8wRsfnaEYefMgZA2SQPH8f43VwYB0oq0qm0OYfo+125Pm0OFl8I= X-Received: by 2002:a17:90b:54c3:b0:311:ff18:b83e with SMTP id 98e67ed59e1d1-315f25e4165mr9906600a91.9.1750931867961; Thu, 26 Jun 2025 02:57:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Thu, 26 Jun 2025 15:27:36 +0530 X-Gm-Features: Ac12FXwrngC08JUhtB1_5LJvDCYnQwoKG08JqtOruunDgj-oge_XFcb6oYKtw84 Message-ID: Subject: Re: Skipping schema changes in publication To: Shlok Kyal Cc: Peter Smith , Amit Kapila , "Zhijie Hou (Fujitsu)" , vignesh C , YeXiu <1518981153@qq.com>, Ian Lawrence Barwick , Bharath Rupireddy , PostgreSQL Hackers , shveta malik 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 Tue, Jun 24, 2025 at 9:48=E2=80=AFAM Shlok Kyal wrote: > > I have included the changes for > it in v14-0003 patch. > Thanks for the patches. I have reviewed patch001 alone, please find few comments: 1) + + The RESET clause will reset the publication to the + default state which includes resetting the publication parameters, sett= ing + ALL TABLES flag to false and + dropping all relations and schemas that are associated with the + publication. It is misleading, as far as I have understood, we do not drop the tables or schemas associated with the pub; we just remove those from the publication's object list. See previous doc: "The ADD and DROP clauses will add and remove one or more tables/schemas from the publication" Perhaps we want to say the same thing when we speak about the 'drop' aspect of RESET. 2) AlterPublicationReset(): + if (!OidIsValid(prid)) + ereport(ERROR, + (errcode(ERRCODE_UNDEFINED_OBJECT), + errmsg("relation \"%s\" is not part of the publication", + get_rel_name(relid)))); Can you please help me understand which scenario will give this error? Another question is do we really need this error? IIUC, we generally give errors if a user has explicitly called out a name of an object and that object is not found. Example: postgres=3D# alter publication pubnew drop table t1,tab2; ERROR: relation "t1" is not part of the publication While in a few other cases, we pass missing_okay as true and do not give errors. Please see other callers of performDeletion in publicationcmds.c itself. There we have usage of missing_okay=3Dtrue. I have not researched myself, but please analyze the cases where missing_okay is passed as true to figure out if those match our RESET case. Try to reproduce if possible and then take a call. 3) +ALTER PUBLICATION testpub_reset ADD ALL TABLES IN SCHEMA public; +ERROR: syntax error at or near "ALL" +LINE 1: ALTER PUBLICATION testpub_reset ADD ALL TABLES IN SCHEMA pub... There is a problem in syntax, I think the intention of testcase was to run this query successfully. thanks Shveta