I can't create extension on postgresql9.5 server (hot standby). During to attempting I received:

db=# create extension pgrowlocks;
ERROR:  cannot execute CREATE EXTENSION in a read-only transaction

Can anyone assist? Thnx.

closed as off-topic by Jack Douglas Feb 28 '17 at 10:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Jack Douglas
If this question can be reworded to fit the rules in the help center, please edit the question.


As the error message says: the standby is read-only you can't run any statements on the standby that change things.

If you need the extension on the standby you need to create it on the master

  • On master extension already created. Replication is ok. But I can't see installed ext. on standby. Because of this I tried create ext. on standby. – user113254 Feb 28 '17 at 7:52
  • @OlegAkchurin: does it show up in pg_available_extensions? – a_horse_with_no_name Feb 28 '17 at 8:01
  • Yes. I'm sorry. Replication is broken...(: – user113254 Feb 28 '17 at 8:04