Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

'last seen' data may be hours out of date #3652

Closed
richvdh opened this issue Aug 6, 2018 · 4 comments
Closed

'last seen' data may be hours out of date #3652

richvdh opened this issue Aug 6, 2018 · 4 comments
Labels
z-major (Deprecated Label) z-p2 (Deprecated Label)

Comments

@richvdh
Copy link
Member

richvdh commented Aug 6, 2018

We try to lock the whole user_ips table to do updates. This has two bad effects:

  • postgres keeps trying to start autovacuums which it then has to abort
  • when postgres finally gives up and does the autovacuum anyway, no user_ips updates happen until the vacuum completes, which can take several hours.
@richvdh
Copy link
Member Author

richvdh commented Nov 22, 2018

search keywords: locked upsert

@richvdh
Copy link
Member Author

richvdh commented Dec 21, 2018

fixing this would nomally be done by adding a unique constraint to the table so that we can do an upsert without locking the whole table; however this is complicated by the fact that the table currently has a bunch of duplicate entries.

@richvdh
Copy link
Member Author

richvdh commented Dec 21, 2018

(note also that the dups are still happening so it's not as simple as clearing out the dups before adding the constraint)

@richvdh
Copy link
Member Author

richvdh commented Jan 31, 2019

should be fixed by #4306

@richvdh richvdh closed this as completed Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-major (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants