xTuple.com xTupleU Blog & News Customer Support

Updater

updating 11 beta to 11 RC running on 9.6 but getting a problem with statement:

Failed
The following error was encountered while trying to check the prerequisite Checking for plv8 setup in postgresql.conf:
ERROR: Please add the line “plv8.start_proc = ‘xt.js_init’” to your postgresql.conf and restart the database server. CONTEXT: PL/pgSQL function inline_code_block line 8 at RAISE (P0001)
QPSQL: Unable to create query

Checking the conf file manually shows presence of code on file

Checking using admin 4 gives

– Executing query:
EXPLAIN plv8.start_proc = ‘xt.js_init’
syntax error at or near “plv8”
LINE 1: EXPLAIN plv8.start_proc = ‘xt.js_init’

Can you help?

Hi

I have found the earlier members comments re the same so the work around should theoretically meet this problem however I do not have Tools> in my Menu as per other posts through Missy Schmidt listed as

VAT set up in PostBooks

OK so I have done as per the other post and opened the Meta sql editor and then executed as per the instructions by Gil

However I get:

ERROR: Invalid query!

So I am unable to update

Many thanks

Hey Foxy, what OS are your running your Postgresql on? ( WIndows, Ubuntu, Mac?). I have seen that error using the XTAU updater and while the complaint was still there the database was updated without issues ( other than the complaint). Are you using the graphical updater downloaded from SourceForge?
you can try this one from your meta in the short term:

show plv8.start_proc;

also here is the documentation on all of this:

https://github.com/xtuple/xtuple/wiki/Installing-PLv8

TIA
Tom

Hi Tom

Thanks

Mac

Yes using the 2.4.0

The updater is to take tuple from the 11 beta to 11RC

Many thanks

Craig

Thanks Craig, good to know but I would have to defer this to our internal Mac experts. Let me see what their thoughts are on the subject.

Thanks Tom

Craig,

I’m confused by:

OK so I have done as per the other post and opened the Meta sql editor and then executed as per the instructions by Gil
However I get:
ERROR: Invalid query!

What query did you run? Also, did the Updater give any other prerequisite check errors?

You should be able to test the plv8.start_proc setting in the MetaSQL editor:

show plv8.start_proc;

The result should be xt.js_init, of course. If you get anything else, View > Log Output, copy the entire error text, and paste it here. It’ll be easier to read if you type three back-quotes (aka open single quotes) before and again after the entire error text.

Gil

Hi Gil

I ran as per above and got

‘’’---- Parsing Query ----

Query parsed.’’’

The other query was [as per your post in May

CREATE OR REPLACE FUNCTION xt.js_init(debug BOOLEAN DEFAULT false, initialize BOOLEAN DEFAULT false)
RETURNS VOID AS $$ BEGIN RETURN; END; $$ LANGUAGE plpgsql;

which I have now rerun but used Parse Query rather than Execute query and got the correct response of Query parsed. I have just rerun the updater and got

Failed
The following error was encountered while trying to check the prerequisite Checking for plv8 setup in postgresql.conf:
ERROR: Please add the line “plv8.start_proc = ‘xt.js_init’” to your postgresql.conf and restart the database server. CONTEXT: PL/pgSQL function inline_code_block line 8 at RAISE (P0001)
QPSQL: Unable to create query

Thanks

Craig

Craig,

“Parsing the query” and “executing the query” are very different things. “Parsing” just checks to see if it’s grammatically correct.

First, please run/execute the show plv8.start_proc; to see the value of the setting. Note that this is a show, not a set - all we’re trying to do is see if the postgresql.conf file has been set up properly for “this” database server. If the value comes back blank or there’s a message saying plv8.start_proc has not been set, but you know that postgresql.conf has been changed, you need to either reload or restart the server. “Reload” means reread its configuration file while “restart” means everyone has to log out of the database so the server processes can be stopped and started again.

Second, make sure if you use the MetaSQL editor to run/execute the create or replace function above that Test Mode is turned off. Otherwise the function creation gets rolled back right after it’s done.

Gil