mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-08 21:05:21 +00:00
Fix exact count that caused the RO replicate to fall over...
This commit is contained in:
+2
-1
@@ -300,7 +300,8 @@ func (c *Cache) MarkPublished(m *model.Message) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// MessagesCount returns the total number of messages in the cache
|
||||
// MessagesCount returns the total number of messages in the cache. On Postgres, this is the
|
||||
// planner's estimate once the table has been analyzed, not an exact count.
|
||||
func (c *Cache) MessagesCount() (int, error) {
|
||||
rows, err := c.db.ReadOnly().Query(c.queries.selectMessagesCount)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user