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 1tAoPv-000FcM-Fr for pgsql-general@arkaria.postgresql.org; Tue, 12 Nov 2024 10:46:38 +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 1tAoPs-005LmI-SX for pgsql-general@arkaria.postgresql.org; Tue, 12 Nov 2024 10:46:37 +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 1tAoPs-005LmA-GS for pgsql-general@lists.postgresql.org; Tue, 12 Nov 2024 10:46:37 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tAoPp-001WK9-KQ for pgsql-general@postgresql.org; Tue, 12 Nov 2024 10:46:36 +0000 Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-6cbcd49b833so36899276d6.3 for ; Tue, 12 Nov 2024 02:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731408393; x=1732013193; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=MSur42QQ9pWEwr9cW+Jj3E5s1w4vs4N0MuE8qAFFUnI=; b=a0pYfjM2VcHK/zrUE4Pdj4RK6oZM27sZP3ekaO6soqH0jV5xvOW1l4OKcLzMoO6axh OOAp7L395ZuURxP6GavrNLRI56kX8YiI7BD3H4f1fYc2WEHxCz54oWJQmdbOTsC0SkWF hu6QuEQFcxaB/bk9Ig9Uc8oA1XPT5hdksftXQsc/IQseff8z6QsRoL2rK9wVR/bUla07 GmYEltwDxeiJqur4fAcPhBZHsA52m2jMQWkGHi0Jve2CCuSEe26ERNivKKlKFOt++QOi 6U3VTE+t/E/74Cc4YBHlNYkhyEyaHuR1Fs3086kZlYxqq2tcFsLLYN84GFEZ2yeRw6Um PzhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731408393; x=1732013193; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=MSur42QQ9pWEwr9cW+Jj3E5s1w4vs4N0MuE8qAFFUnI=; b=mSGAHl7GnldWRpbEO/r6jFTUwuReyYWN0lOsL8r999Yys3Ot72xma3LzO/VdeYxnqW QBwvIvE9ertKjpk21/9Y29zIJX9z9+Vy7MtfyXQ9Pq+5osdPeRycRV1qIJC/Vw2gnyov NfCsmEYV3Y9gqWRZlhJLLgtZu7ExjAIjzTnP0xeLKyOlTGYnEBvgvaTrrmiVPEzuDQUB N8V2126K/ZTSTndml0Hg6840OgJ94l6fB0AqK/TTGseRSqBkwRn67rLythFAtB1ff2Bw 42vsZ0epun+vP84DiN9P7LDILyWz2n9HiycAHD9XN0v71MQQvGU5mVTAiDOEcp8UypuN Yg9Q== X-Gm-Message-State: AOJu0YxEX2rbVZKQtQ2CReW7qXX/nnKCeU4rF6jgqL5WTQaeuBw5QuOS +K1ju1Jv4KIvtN4NtJg6ocoINwP7F/Lw6h0rqiOJa+KBiC0YlPAWBL0oJKocZPaVLs00jivbXgn rtVTTy2xvFhkDqrK5R4nDxQvvNp1rc7ca X-Google-Smtp-Source: AGHT+IGWOrwnb1NRJyUKInEZWpJ8dubPJb8+fQVgftYgnD3LSCZYJZm/nRnGSXxrd+BLyc0DX1Nfb4nzNsJEH+K5Qvo= X-Received: by 2002:a05:6214:5a08:b0:6d3:447f:db4c with SMTP id 6a1803df08f44-6d39e1bae7amr178403616d6.43.1731408392663; Tue, 12 Nov 2024 02:46:32 -0800 (PST) MIME-Version: 1.0 From: Jayadevan M Date: Tue, 12 Nov 2024 16:16:21 +0530 Message-ID: Subject: PostgreSQL logical replication To: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="00000000000034b8990626b4ee9c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000034b8990626b4ee9c Content-Type: text/plain; charset="UTF-8" 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: permission 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 --00000000000034b8990626b4ee9c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello all,

I am using=C2=A0PostgreSQL 16.4. I= tried to set up logical replication with "postgres"=C2=A0user an= d all worked fine.=C2=A0 Then I created a new user (my_replication) to be u= sed for the purpose and couldn't figure out which privileges are necess= ary. Initially I got an error like "ERROR: =C2=A0permission denied for= database mydb" . So I used=C2=A0GRANT CREATE ON DATABASE..and that er= ror disappeared. I have also executed...
ALTER USER my_repl= ication WITH replication;
GRANT usage ON SCHEMA public TO my_replication= ;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO my_replication;
When I try=C2=A0
=C2=A0CREATE PUBLICATION my_publication for t= able public.term;
I am getting an error=C2=A0
ERROR: = =C2=A0must be owner of table term

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

Regar= ds,
Jayadevan

--00000000000034b8990626b4ee9c--