Postgresql Transaction ID Not Found

后端 未结 8 1189
小蘑菇
小蘑菇 2021-02-12 11:35

Whenever I am executing a query in postgresql, this is the error message I receive

Transaction ID not found in the session.

Does any

相关标签:
8条回答
  • 2021-02-12 12:14

    So I don't know the exact specifics of my solution, but I found this issue in the following circumstance:

    • Database user was created.
    • Role was assigned for the user.
    • A transaction was used

    I'm still not entirely sure I discovered the solution of the root problem, but if others have the same scenario, it might help troubleshoot it further. If any of those three are not used, then I never encountered the issue.

    0 讨论(0)
  • 2021-02-12 12:15

    To anyone who has this problem, all you have to do is:

    1) Reconnect to the database

    2) Open a new Query Tab. (Run your query here)

    You're welcome.

    0 讨论(0)
  • 2021-02-12 12:15

    Has anyone found an explanation for this problem? I am also getting a "Transaction ID not found in the session.". It's for a long running (several days) query. I ran it on a 10% sample of my data and had no trouble, but now need to repeat the process for the full dataset. I reconnect to the database and the query appears as still active. A new idle query appears as follows:

    SELECT rel.oid, rel.relname AS name,
        (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
        (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
        (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned
    FROM pg_class rel
        WHERE rel.relkind IN ('r','s','t','p') AND rel.relnamespace = 2200::oid
        AND NOT rel.relispartition
            ORDER BY rel.relname;
    
    0 讨论(0)
  • 2021-02-12 12:17

    This is not a PostgreSQL error message. It must come from something else in the stack you are using - a client driver, ORM, etc.

    Please post a more detailed question with full information on the stack you're using.

    0 讨论(0)
  • 2021-02-12 12:25

    For me helped changing 'localhost' in connection settings to '127.0.0.1', as mentioned here: https://stackoverflow.com/a/59747781/2590805

    0 讨论(0)
  • 2021-02-12 12:26

    Create a new Query editor tab, that works for me

    0 讨论(0)
提交回复
热议问题