Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Skytools SQL has a missing function #39

@martinmarques

Description

@martinmarques

Hi,

I was today going through a server which had quite some lag and was forced to run "replay --rewind". All this with the surprise that I got this error:

-bash-4.1$ londiste.py ../londiste_main.ini replay --rewind
2015-02-17 16:27:55,650 10308 INFO Rewinding queue
2015-02-17 16:27:55,699 10308 CRITICAL Job main_replicate crashed: <class 'psycopg2.ProgrammingError'>: 'function pgq.register_consumer_at(unknown, unknown, integer) does not exist
LINE 1: select pgq.register_consumer_at('main_replicate', 'main...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.' (<traceback object at 0x2213098>: [' File "/usr/pgsql-9.1/lib64/python2.6/site-packages/skytools/scripting.py", line 459, in run\n self.startup()\n', ' File "/usr/pgsql-9.1/lib64/python2.6/site-packages/pgq/consumer.py", line 378, in startup\n self.rewind()\n', ' File "/usr/pgsql-9.1/lib64/python2.6/site-packages/pgq/consumer.py", line 471, in rewind\n src_curs.execute(q, [self.pgq_queue_name, self.consumer_id, dst_tick])\n', ' File "/usr/lib64/python2.6/site-packages/psycopg2/extras.py", line 121, in execute\n return super(DictCursor, self).execute(query, vars)\n'])

Interesting thing was that there is no pgq.register_consumer_at function in the SQL for skytools 2 (running skytools 2.1.13), but there is a call to such a function in the python code, specifically when using --rewind.

I was able to find the pgq.register_consumer_at in the skytools3 pgq.register_consumer.sql

I will be checking the code to see if the new register_consumer* functions are compatible with skytools2, but wanted to let you know of the bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions