本文主要是介绍(20210316已解决)postgresql cannot execute CREATE TABLE in a read-only transation,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
-
Overview
如题,在一个postgresql 的docker container里创建数据库出现上述错误。
-
Solution
Normally the most plausible reasons for this kinde of error are:
- trying create statements on a read-only replica (the entire instance is read-only)
<username>
hasdefault_transaction_read_only
set to NO- the database has
default_transaction_read_only
set to NO
My situation is the first one. So, create a new container.
-
Reference
- ERROR: cannot execute CREATE TABLE in a read-only transaction
这篇关于(20210316已解决)postgresql cannot execute CREATE TABLE in a read-only transation的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!