pg_create_logical_replication_slot argument incongruency

Started by Florin Irionover 3 years ago5 messageshackers
Jump to latest
#1Florin Irion
irionr@gmail.com

Hello,

The function `pg_create_logical_replication_slot()` is documented to have
a `two_phase` argument(note the underscore), but the function instead
requires `twophase`.

```
\df pg_catalog.pg_create_logical_replication_slot
List of functions
-[ RECORD 1
]-------+---------------------------------------------------------------------------------------------------------------------------------

Schema | pg_catalog
Name | pg_create_logical_replication_slot
Result data type | record
Argument data types | slot_name name, plugin name, temporary boolean
DEFAULT false, twophase boolean DEFAULT false, OUT slot_name name, OUT lsn
pg_lsn
Type | func
```

This was introduced in commit 19890a06.

IMHO we should use the documented argument name `two_phase` and change the
function to accept it.

What do you think?

Please, check the attached patch.

Cheers,
Florin
--
*www.enterprisedb.com <http://www.enterprisedb.com/&gt;*

Attachments:

two_phase_slot_v1.patchapplication/octet-stream; name=two_phase_slot_v1.patchDownload+4-3
#2Michael Paquier
michael@paquier.xyz
In reply to: Florin Irion (#1)
Re: pg_create_logical_replication_slot argument incongruency

On Mon, Sep 19, 2022 at 07:02:16PM +0200, Florin Irion wrote:

This was introduced in commit 19890a06.

IMHO we should use the documented argument name `two_phase` and change the
function to accept it.

What do you think?

19890a0 is included in REL_14_STABLE, and changing an argument name is
not acceptable in a stable branch as it would imply a catversion
bump. Let's change the docs so as we document the parameter as
"twophase", instead.
--
Michael

#3Florin Irion
irionr@gmail.com
In reply to: Michael Paquier (#2)
Re: pg_create_logical_replication_slot argument incongruency

On 20/09/22 03:33, Michael Paquier wrote:

On Mon, Sep 19, 2022 at 07:02:16PM +0200, Florin Irion wrote:

This was introduced in commit 19890a06.

IMHO we should use the documented argument name `two_phase` and change the
function to accept it.

What do you think?

19890a0 is included in REL_14_STABLE, and changing an argument name is
not acceptable in a stable branch as it would imply a catversion
bump. Let's change the docs so as we document the parameter as
"twophase", instead.
--
Michael

I understand.

OK, patch only for the docs attached.

Cheers,
Florin
www.enterprisedb.com

Attachments:

two_phase_slot_v2.patchtext/plain; charset=UTF-8; name=two_phase_slot_v2.patchDownload+2-2
#4Michael Paquier
michael@paquier.xyz
In reply to: Florin Irion (#3)
Re: pg_create_logical_replication_slot argument incongruency

On Tue, Sep 20, 2022 at 08:41:56AM +0200, Florin Irion wrote:

OK, patch only for the docs attached.

Thanks, applied.
--
Michael

#5Florin Irion
irionr@gmail.com
In reply to: Michael Paquier (#4)
Re: pg_create_logical_replication_slot argument incongruency

Thank you!

Il mar 20 set 2022, 12:29 Michael Paquier <michael@paquier.xyz> ha scritto:

Show quoted text

On Tue, Sep 20, 2022 at 08:41:56AM +0200, Florin Irion wrote:

OK, patch only for the docs attached.

Thanks, applied.
--
Michael