Well, first find the function category_synonym::search_sweeper
and the corresponding xql file for the tcl file and the
query whose name is category_synonym::search_sweeper.delete_old_searches
(the function with the query dot the query name). You get that information from the traceback.
The thing thats breaking is that postgres does not know how
to subtract 1 from a timestamptz; you can tell which
types it knows how to do "-" to via
psql yourserver
\do -
which should list all the "-" operator types.
Looking at that you should see:
Schema | Name | Left arg type | Right arg type | Result type | Description
------------+------+-----------------------------+-----------------------------+-----------------------------+-------------------------------------
...
pg_catalog | - | time with time zone | interval | time with time zone | minus
which tells you what you need rather than an integer is an
interval. So change the 1 to an interval of 1 day in the xql file, and reload changed files for that package at
/acs-admin/apm/ and see if that fixes it.