Re: I’ve come across what I think is a bug

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "John Scalia" <jayknowsunix(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: I’ve come across what I think is a bug
Date: 2023-12-07 15:09:23
Message-ID: fd8850cf-c5a2-4e70-a25a-c3b5bda73fa8@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-12-07 15:14:45 Re: trying again to get incremental backup
Previous Message Joe Conway 2023-12-07 15:07:59 Re: Emitting JSON to file using COPY TO