Coder Social home page Coder Social logo

Comments (7)

ahouska avatar ahouska commented on July 24, 2024

Is the problem that no one can access the table on which pg_squeeze is trying to acquire an exclusive lock (and that lock cannot be acquired due to the idle transactions)? If this is the case, then it's not specific to pg_squeeze: any DDL command will probably cause the same situation. Please describe your problem more in detail if I misunderstood.

from pg_squeeze.

Dsolik avatar Dsolik commented on July 24, 2024

Squeeze is waiting for the completion of transactions in the status of idle in transaction, as a result of which a huge blocking tree can be formed, I would like squeeze to be able to shoot such transactions, for example, as it does pg_repack -D

from pg_squeeze.

Dsolik avatar Dsolik commented on July 24, 2024

Now in crontab we run: select pg_terminate_backend (pid),(now() - pg_stat_activity.xact_start) as duration,query from pg_stat_activity where pid=(select pid from pg_locks where relation=(select relation from pg_locks where pid=(select pid from pg_stat_activity where backend_type ='squeeze worker') and granted='f') and granted ='t') and (now() - pg_stat_activity.xact_start)> interval '1 minutes'

from pg_squeeze.

ahouska avatar ahouska commented on July 24, 2024

SELECT squeeze.stop_worker();

from pg_squeeze.

ahouska avatar ahouska commented on July 24, 2024

Squeeze is waiting for the completion of transactions in the status of idle in transaction, as a result of which a huge blocking tree can be formed, I would like squeeze to be able to shoot such transactions, for example, as it does pg_repack -D

You still haven't explained in detail what happens. The contents of pg_locks system table at the time the problem exists might give me a clue.

from pg_squeeze.

Dsolik avatar Dsolik commented on July 24, 2024

pg_locks.log
pg_stat_activity_.log

from pg_squeeze.

ahouska avatar ahouska commented on July 24, 2024

I don't see any call of the squeeze.squeeze_table() function in pg_stat_activity. Only this function does the actual work, including locking and waiting for locks. I was curious about the "lock tree" that you mentioned earlier.

from pg_squeeze.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.