I’ve come across what I think is a bug

Started by John Scaliaabout 2 years ago2 messages
#1John Scalia
jayknowsunix@gmail.com

In the documentation, Under CREATE PUBLICATION under parameters

publish (string)
This parameter determines which DML operations will be published by the new publication to the subscribers. The value is comma-separated list of operations. The default is to publish all actions, and so the default value for this option is ‘insert, update, delete, truncate’.

From what I’ve seen, truncate is not set to published by default. I’m looking at a server now with 4 publications on it, and none has truncate set to true. One of these I created, and I know I didn’t set any values. All the other values are set, but not truncate.

I don’t know if this was intentional in the code or an oversight, but documentation is incorrect currently. Also, the line before, beginning with “The value is comma-separated…”, could use a little work as well. Maybe just an “a” between “is” and “comma-separated”.

Jay

Sent from my iPad

#2Euler Taveira
euler@eulerto.com
In reply to: John Scalia (#1)
Re: I’ve come across what I think is a bug

On Thu, Dec 7, 2023, at 11:39 AM, John Scalia wrote:

In the documentation, Under CREATE PUBLICATION under parameters

publish (string)
This parameter determines which DML operations will be published by the new publication to the subscribers. The value is comma-separated list of operations. The default is to publish all actions, and so the default value for this option is ‘insert, update, delete, truncate’.

From what I’ve seen, truncate is not set to published by default. I’m looking at a server now with 4 publications on it, and none has truncate set to true. One of these I created, and I know I didn’t set any values. All the other values are set, but not truncate.

What's your Postgres version? The truncate option was introduced in v11. You
didn't provide an evidence that's a bug. Since v11 we have the same behavior:

postgres=# create publication pub1;
CREATE PUBLICATION
postgres=# \x
Expanded display is on.
postgres=# select * from pg_publication;
-[ RECORD 1 ]+-----
pubname | pub1
pubowner | 10
puballtables | f
pubinsert | t
pubupdate | t
pubdelete | t
pubtruncate | t

postgres=# select version();
-[ RECORD 1 ]-----------------------------------------------------------------------------------------------
version | PostgreSQL 11.21 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

Maybe you are using a client that is *not* providing truncate as an operation.

--
Euler Taveira
EDB https://www.enterprisedb.com/