problem with postgres and 2.0.4
hi, anyone else noted this - i'll file a bug if theres another noted problem. we are using the database to hold NAS entries. just upgraded to 2.0.4 and radiusd wont start. log shows this: Mon May 5 14:55:55 2008 : Info: rlm_sql (xbase): Driver rlm_sql_postgresql (module rlm_sql_postgresql) loaded and linked Mon May 5 14:55:55 2008 : Info: rlm_sql (xbase): Attempting to connect to radius@localhost:/xbase Mon May 5 14:55:55 2008 : Error: sql_postgresql: calling unimplemented function further debugging with radiusd -X shows the following (we have 10 SQL threads open - default) rlm_sql (xbase): Attempting to connect rlm_sql_postgresql #9 rlm_sql (xbase): Connected new DB handle, #9 rlm_sql (xbase): Processing generate_sql_clients rlm_sql (xbase) in generate_sql_clients: query is SELECT id, nasname, shortname, type, secret FROM xbaseschema.naslist rlm_sql (xbase): Reserving sql socket id: 9 rlm_sql_postgresql: Status: PGRES_TUPLES_OK rlm_sql_postgresql: query affected rows = 39 , fields = 5 rlm_sql (xbase): Read entry nasname=127.0.0.1,shortname=localhost,secret=topsecretstuff sql_postgresql: calling unimplemented function this is postgres 8.1.11 - no change to schema between previous versions - all looks fine and a quick rollback to 2.0.3 and the daemon is fine. 2.0.4 postgres issue? alan
A.L.M.Buxey@lboro.ac.uk wrote:
anyone else noted this - i'll file a bug if theres another noted problem. we are using the database to hold NAS entries.
Add a "server" column to the schema, or to the query, with NULL value.
just upgraded to 2.0.4 and radiusd wont start. log shows this:
Mon May 5 14:55:55 2008 : Info: rlm_sql (xbase): Driver rlm_sql_postgresql (module rlm_sql_postgresql) loaded and linked Mon May 5 14:55:55 2008 : Info: rlm_sql (xbase): Attempting to connect to radius@localhost:/xbase Mon May 5 14:55:55 2008 : Error: sql_postgresql: calling unimplemented function
There is no "sql_num_rows" function in postgres, which is needed by the NAS initialization routines. I guess it should be added. see: ... numfields = PQnfields(pg_sock->result) in the "query" routine. Maybe this can be stored in the header, like 'affected_row', and returned... As always, patches are welcome. Alan DeKok.
Hi,
Add a "server" column to the schema, or to the query, with NULL value.
didnt work. as hinted at, rlm_sql now has a num_fields thing to see if you've used 5 or 6 rows. if you use 5, you're normal, if you've used 6 then the new field is the virtual server. hmmm....too dumb really, but I'll bite.
in the "query" routine. Maybe this can be stored in the header, like 'affected_row', and returned...
As always, patches are welcome.
submitted bug 551 - this gives sql_postgres a sql_num_fields function which is needed for the new virtual_server to work (or not work if you dont want them!) alan
participants (2)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok