Skip to content

Reindex concurrently using pg_timetable #658

Closed

Description

@ArashMasroor

I am using pg_timetable to reindex concurrently some of my indexes.
While doing the reindex, another query comes and locks the table. At this time an error appears and the command does not get finished.

Here is my config:

1
2
3

Here is the execution log:
4

Here is the timetable log:
5

How is it possible to overcome this error?

Activity

  1. pashagolub commented on Aug 16, 2024

    @pashagolub
    Collaborator

    Would you please provide the full error message for unexpected EOF.

    Seems like you have connection issues and it's nothing we can do on pg_timetable side.

  2. self-assigned this
    on Aug 16, 2024
  3. ArashMasroor commented on Aug 16, 2024

    @ArashMasroor
    Author

    There is not any error other than the logs I posted. If there is, please guide me to get it then I will post it.

    As I explained the reason is the other queries that lock the table,which I am reindexing by the job.I wish the job could wait until they finish and unlock the table.
    May be if the time out get increased, the problem would be solved.

    Here the time out field is set to 0,but job gets failed as soon as the lock occures.

  4. pashagolub commented on Aug 16, 2024

    @pashagolub
    Collaborator

    There are such things as statement_timeout, idle_in_transaction_session_timeout and idle_session_timeout. And these options are controlled by you. Please make sure the session is not dropped by the server due these settings.

    pg_timetable has timeouts for chains and tasks. Default value 0 means wait forever.

  5. ArashMasroor commented on Aug 19, 2024

    @ArashMasroor
    Author

    Sorry for the delay.

    This is the value of those parameters:
    idle_in_transaction_session_timeout is set to 600000
    statement_timeout is set to 0
    idle_session_timeout is not set at all and is not in the .config file.

  6. locked and limited conversation to collaborators on Aug 21, 2024
  7. converted this issue into a discussion #659 on Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions