First of all, I upgraded from 18.7, not 18.2, I typoed earlier.

After some digging, the problem I originally reported turns out to be a 
warning that can safely be ignored. In case anybody else comes across this, 
here's what's going on.

This sql statement is invoked in line 107 of the script 
/usr/lib/bareos/scripts/update_bareos_tables. The only command after this 
is to remove files in /tmp. Digging into the database and inspecting the 
sequence basefiles_baseid_seq shows that it is already of type BIGINT, 
which triggered the warning. 

bareos=# \d basefiles_baseid_seq
     Sequence "public.basefiles_baseid_seq"
    Column     |  Type   |        Value         
---------------+---------+----------------------
 sequence_name | name    | basefiles_baseid_seq
 last_value    | bigint  | 1
 start_value   | bigint  | 1
 increment_by  | bigint  | 1
 max_value     | bigint  | 9223372036854775807
 min_value     | bigint  | 1
 cache_value   | bigint  | 1
 log_cnt       | bigint  | 0
 is_cycled     | boolean | f
 is_called     | boolean | f
Owned by: public.basefiles.baseid

Since it was only a warning, pgsql did not return an error, and the rest of 
the script completed successfully. Restarted the director daemon and it 
comes up fine, listing all of my completed jobs, which should indicate a 
happy database.

Upgrading all my clients went fine without any problems.

Seth

On Friday, March 10, 2023 at 10:30:59 AM UTC-6 Seth Galitzer wrote:

Finally getting around to my upgrade, running the update_bareos_tables to 
patch the db and get this output and error: 

Info: Updating bareos tables 
Info: Upgrading database schema from version 2171 to 2192 
BEGIN 
ALTER TABLE 
DROP INDEX 
UPDATE 1 
COMMIT 
SET 
ANALYZE 
Info: Upgrading database schema from version 2192 to 2210 
BEGIN 
CREATE INDEX 
UPDATE 1 
DROP VIEW 
DROP VIEW 
CREATE VIEW 
CREATE VIEW 
COMMIT 
SET 
ANALYZE 
ERROR:  syntax error at or near "AS" 
LINE 1: ALTER SEQUENCE basefiles_baseid_seq AS BIGINT 
                                            ^ 
Warning: WARNING: Failed to update sequence basefiles_baseid_seq 
Info: Finished upgrading database to version 2210 

I'm guessing the upgrade didn't actually finish, the script just dropped 
out prematurely. What do I need to do to get past this? 

Using Postgres 9.2 on CentOS 7. 

Thanks. 
Seth 

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/a01a8141-6607-4f73-87d2-4802481d57e6n%40googlegroups.com.

Reply via email to