Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
283 views
in Technique[技术] by (71.8m points)

postgresql - Postgres subscription is not enabling

I am on cluster of postgresql server where we get user for time limit, there is one already created subscription show it disabled, I want to enable it, but it is created by other user, even I become superuser but it is not enabled by using following command

ALTER SUBSCRIPTION mysub ENABLE;

I get following error

ERROR:  must be owner of subscription wildcards

I changed my role to superuser but it still can't enable it. How can I enable this service, as I suspect it was disable due to up-gradation of slave from postgresql 11 to 12 version. What roles are usally required to ENABLE subscriptions. I am using SET ROLE command to be superuser. Do I need to run ALTER USER command?

question from:https://stackoverflow.com/questions/65939844/postgres-subscription-is-not-enabling

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After doing a lot things and wasting two days I got following method. First in my subscription user name is visible so use following command to change user.

grant {your_user_name} role to current_user

Now connect to that DB and Alter your subscription but instead of Enable you have to delete and recreate it, but remember you must have master credentials. This work and these all are commands of postgresql and I got help from its documentation, I don't know why it aws rds postgres is not postgresql.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...