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 1tArhg-000WJz-L3 for pgsql-general@arkaria.postgresql.org; Tue, 12 Nov 2024 14:17:11 +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 1tArhe-006slm-3C for pgsql-general@arkaria.postgresql.org; Tue, 12 Nov 2024 14:17:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tArhd-006skj-OM for pgsql-general@lists.postgresql.org; Tue, 12 Nov 2024 14:17:10 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tArha-001Y79-H4 for pgsql-general@postgresql.org; Tue, 12 Nov 2024 14:17:09 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5ebc04d495aso3063075eaf.2 for ; Tue, 12 Nov 2024 06:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731421026; x=1732025826; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=S9mUwR0kQUIgac6ydWQYEyAYdtu685yJjn8vNIgSsi8=; b=lOKIJ5uSKF/jllg6dzeG8Sd3WTl1D2cv8/xaAWC5duNendhRQJigAJe8nybVCh9pXv OY4hP+iH/9ukUZOLnsTLdkhjdy+KIBZ8kFKrFZXb3MvBqzsixHoHqjWneobdOUhA6Esr RlLs9j24C7G0NI/ylPh+zLKXcBIaYVKRx5Pgs5FUbBwrgIEPjAlT3u9eHYLI7wx1zauY rTgePL6JW0CGYYfzsi/5IvCncP39HFdQlKfEGBSla2/fkP/EAf6iuUyYTlm4wswJryoz mcdB0P31Ed0naMSa+WW3fF9wba6kwHL981Ybp2zx4d7l0mHqYSq4m9IHOfFP5vQldhKG FUpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731421026; x=1732025826; h=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=S9mUwR0kQUIgac6ydWQYEyAYdtu685yJjn8vNIgSsi8=; b=QwbmuuJpUPx9yRo7oxMDYY0bLUUssjzv4foOv2dytS11k4wefTbg5OFjnk5X9IOEPe wcaUovNt2501DiS4txOCV0JoBTMVb/HnRaKNabDgzVoqXYQZGZ+EOC4wpv9phM9lBIuJ lAPXPSY0EZ4sBy8P8A+vnurMRX+EFpBrsdQk2turVMUoXXqDexmxJBJoeuJg95yThzFI GYDfoFaqi7GE62ZCzPh1ba5t7WPPo05vMUW85QNrMfOJrVdSGqgg0gGKdEuEk0mCG1v1 AkybAly8Jzur4HKxt4ikMIMv6F1AbZmvMwOkH/fQDBYilW8L1fCTmmlbSjdY9EVtEFWW ZTzQ== X-Gm-Message-State: AOJu0YwEJJONVjgEZbUB0mmBv26ykqX6TDLb5hzYS2wUUn3BtIs/w4wx LFT8sAMU31HCkO2Qhgm/Xld3KjMDK1njUrxUsHMDZ3ak/rYi6gq90JdZtiC6TXdZJHWRHrMaUp9 Smt5Hm/cJZDFsIKsbkYt9scPP8iSw8BYv X-Google-Smtp-Source: AGHT+IGO6gN01rapG7DxuKLi/C/2xJcqHnbYxA/AfqYOsY6qSY2LAfYlEmJkPynTaCa42ncvt6ieOd3ShWxEFnOTRbc= X-Received: by 2002:a4a:e841:0:b0:5ed:f849:51dd with SMTP id 006d021491bc7-5ee57c8d182mr11033718eaf.8.1731421025605; Tue, 12 Nov 2024 06:17:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Tue, 12 Nov 2024 09:16:54 -0500 Message-ID: Subject: Re: PostgreSQL logical replication To: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="0000000000003021b20626b7df21" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003021b20626b7df21 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The documentation tells you, down in the Notes section. https://www.postgresql.org/docs/16/sql-createpublication.html On Tue, Nov 12, 2024 at 5:46=E2=80=AFAM Jayadevan M wrote: > Hello all, > > I am using PostgreSQL 16.4. I tried to set up logical replication with > "postgres" user and all worked fine. Then I created a new user > (my_replication) to be used for the purpose and couldn't figure out which > privileges are necessary. Initially I got an error like "ERROR: permissi= on > denied for database mydb" . So I used GRANT CREATE ON DATABASE..and that > error disappeared. I have also executed... > ALTER USER my_replication WITH replication; > GRANT usage ON SCHEMA public TO my_replication; > GRANT SELECT ON ALL TABLES IN SCHEMA public TO my_replication; > When I try > CREATE PUBLICATION my_publication for table public.term; > I am getting an error > ERROR: must be owner of table term > > What privileges should be granted so that I can do > CREATE PUBLICATION my_publication FOR TABLES IN SCHEMA public; > > Regards, > Jayadevan > > --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000003021b20626b7df21 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The documentation tells you, down in the Notes section.

On Tue, Nov 12, 2024 at 5:46=E2=80=AFAM Jayadevan M <maymala.jayadevan@gmail.com= > wrote:
Hello all,

I am using=C2=A0PostgreSQL 16.4. I tri= ed to set up logical replication with "postgres"=C2=A0user and al= l worked fine.=C2=A0 Then I created a new user (my_replication) to be used = for the purpose and couldn't figure out which privileges are necessary.= Initially I got an error like "ERROR: =C2=A0permission denied for dat= abase mydb" . So I used=C2=A0GRANT CREATE ON DATABASE..and that error = disappeared. I have also executed...
ALTER USER my_replicat= ion WITH replication;
GRANT usage ON SCHEMA public TO my_replication;GRANT SELECT ON ALL TABLES IN SCHEMA public TO my_replication;
W= hen I try=C2=A0
=C2=A0CREATE PUBLICATION my_publication for table= public.term;
I am getting an error=C2=A0
ERROR: =C2=A0= must be owner of table term

What privileges should= be granted so that I can do=C2=A0
=C2=A0CREATE PUBLICATION my_pu= blication FOR TABLES IN SCHEMA public;

Regards,
Jayadevan



--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobs= ter!
--0000000000003021b20626b7df21--