Thread
Commits
-
Fix argument of pg_create_logical_replication_slot for slot name
- ce89ad0fa07d 12.0 landed
-
pg_create_logical_replication_slot returns text instead of name
Masahiko Sawada <sawada.mshk@gmail.com> — 2018-07-12T10:00:48Z
Hi, The documentation[1] says that both pg_create_logical_replication_slot and pg_create_physical_replication_slot returns slot_name as a name type. But only pg_create_logical_replication_slot returns it as text type. I think these should be united as the name type. Attached small patch fixes it. [1] https://www.postgresql.org/docs/devel/static/functions-admin.html#FUNCTIONS-REPLICATION Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
-
Re: pg_create_logical_replication_slot returns text instead of name
Michael Paquier <michael@paquier.xyz> — 2018-07-12T13:18:53Z
On Thu, Jul 12, 2018 at 07:00:48PM +0900, Masahiko Sawada wrote: > The documentation[1] says that both pg_create_logical_replication_slot > and pg_create_physical_replication_slot returns slot_name as a name > type. But only pg_create_logical_replication_slot returns it as text > type. I think these should be united as the name type. Attached small > patch fixes it. > > [1] https://www.postgresql.org/docs/devel/static/functions-admin.html#FUNCTIONS-REPLICATION That's a small thing, but I agree with you. As far as I can see slot names are always mapped with the name type. I'll push that tomorrow if there are no objections. -- Michael
-
Re: pg_create_logical_replication_slot returns text instead of name
Michael Paquier <michael@paquier.xyz> — 2018-07-13T00:48:58Z
On Thu, Jul 12, 2018 at 10:18:53PM +0900, Michael Paquier wrote: > That's a small thing, but I agree with you. As far as I can see slot > names are always mapped with the name type. I'll push that tomorrow if > there are no objections. Pushed, with a catalog version bump. While double-checking things, I have noticed that pg_stat_wal_receiver also uses text for slot names. I am not sure if this one is worth bothering as the docs point out the correct type, just mentioning. -- Michael
-
Re: pg_create_logical_replication_slot returns text instead of name
Masahiko Sawada <sawada.mshk@gmail.com> — 2018-07-13T02:14:01Z
On Fri, Jul 13, 2018 at 9:48 AM, Michael Paquier <michael@paquier.xyz> wrote: > On Thu, Jul 12, 2018 at 10:18:53PM +0900, Michael Paquier wrote: >> That's a small thing, but I agree with you. As far as I can see slot >> names are always mapped with the name type. I'll push that tomorrow if >> there are no objections. > > Pushed, with a catalog version bump. > Thank you! > While double-checking things, I have noticed that pg_stat_wal_receiver > also uses text for slot names. I am not sure if this one is worth > bothering as the docs point out the correct type, just mentioning. Hmm, I'm also not sure about the policy of usage of name data type for columns that show an object identifier on external servers. There is a similar case; we have the pubname in pg_subscritpion as name type whereas the subpublications in pg_subscription is text[] type. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
-
Re: pg_create_logical_replication_slot returns text instead of name
Michael Paquier <michael@paquier.xyz> — 2018-07-13T02:22:11Z
On Fri, Jul 13, 2018 at 11:14:01AM +0900, Masahiko Sawada wrote: > Hmm, I'm also not sure about the policy of usage of name data type for > columns that show an object identifier on external servers. There is a > similar case; we have the pubname in pg_subscritpion as name type > whereas the subpublications in pg_subscription is text[] type. Let's not bother then. In the case of the function you pointed out the intention behind the code was clear anyway, so that's better now. -- Michael
-
Re: pg_create_logical_replication_slot returns text instead of name
Masahiko Sawada <sawada.mshk@gmail.com> — 2018-07-13T02:28:01Z
On Fri, Jul 13, 2018 at 11:22 AM, Michael Paquier <michael@paquier.xyz> wrote: > On Fri, Jul 13, 2018 at 11:14:01AM +0900, Masahiko Sawada wrote: >> Hmm, I'm also not sure about the policy of usage of name data type for >> columns that show an object identifier on external servers. There is a >> similar case; we have the pubname in pg_subscritpion as name type >> whereas the subpublications in pg_subscription is text[] type. > > Let's not bother then. In the case of the function you pointed out the > intention behind the code was clear anyway, so that's better now. Yeah, I agreed with you. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center