Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NOREPLICATION option for Postgres 9.1 #333

Merged
merged 1 commit into from Jan 8, 2014

Conversation

brandonwamboldt
Copy link
Contributor

Fixing a bug when using this module with Postgresql 9.1 that causes alter role statements to execute during every apply.

If replication is disabled, the module is supposed to alter the role to set NOREPLICATION, however, $replication_sql is set to an empty string by default to avoid breaking on pre 9.1 installs.

Fixing a bug when using this module with Postgresql 9.1 that causes alter role statements to execute during every apply.
@kbarber-jenkins2
Copy link

Can one of the admins verify this patch?

@teajaymars
Copy link

This is a similar-but-different solution to my pull request #334

However I think they both have the exact same effect, mine is a bit cleaner though. (?)

@brandonwamboldt
Copy link
Contributor Author

@Zephod I tried that first, but it breaks Postgres versions under 9.1. On line 34 that query uses the contents of $replication_sql to create a user, and the NOREPLICATION option won't be recognized on older versions of Postgres causing it to fail.

That's why I did my more hacky solution :)

@teajaymars
Copy link

Got it. I'll close mine.

So to confirm, this stops it spitting out crap on stdout every single time right?

@brandonwamboldt
Copy link
Contributor Author

@Zephod Yes sir, it was annoying me having that crap on stdout and was causing my nodes to show as changed in the puppet dashboard. My patch fixes it :)

@jhoblitt
Copy link

jhoblitt commented Jan 7, 2014

I can confirm that this patch does work for me with psql 9.1.11. (As a side note, this PR doesn't break the tests... they were broken by new rspec-puppet releases, I opened #339 investigating the test failures.)

@brandonwamboldt
Copy link
Contributor Author

I really hope a dev comes around and merges this, it's an annoying bug :(

@apenney
Copy link

apenney commented Jan 8, 2014

I will definitely take a look at this for you all in an hour or so. Let me drink this coffee first as I just crawled out of bed.

apenney pushed a commit that referenced this pull request Jan 8, 2014
Fix NOREPLICATION option for Postgres 9.1
@apenney apenney merged commit 7bd0d82 into puppetlabs:master Jan 8, 2014
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Oct 23, 2017
Fix NOREPLICATION option for Postgres 9.1
@Ramesh7 Ramesh7 added the bugfix label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants