• Overview

    如题,在一个postgresql 的docker container里创建数据库出现上述错误。

  • Solution

    Normally the most plausible reasons for this kinde of error are:

    1. trying create statements on a read-only replica (the entire instance is read-only)
    2. <username> has default_transaction_read_only set to NO
    3. the database has default_transaction_read_only set to NO

    My situation is the first one. So, create a new container.

  • Reference

  1. ERROR: cannot execute CREATE TABLE in a read-only transaction
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐