Postgres cluster #1:
***************************- db-pgsql01.oracak.com - master
1. Recreate the sequence zalogs.seq_id
[stock] psql>
\c dbquik1
DROP SEQUENCE stock.seq_id;
CREATE SEQUENCE stock.seq_id
INCREMENT BY 100
MINVALUE 1
MAXVALUE 999999999999999999
START 8000000000057
CACHE 10
NO CYCLE;
2. Check the location of indexes in the correct tablespace. If an index is located incorrectly, execute the resulting script to move it to the TS ts_stock_index
There are no indexes to move in the current schema!
An addition (preparation of scripts):
--------------------------------------
-- 1. Check the location of indexes in the correct tablespace
-- If the index is located incorrectly, execute the resulting script to move it to the TS ts_stock_index
[stock] psql>
select 'ALTER INDEX stock."'||obj.relname||'" SET TABLESPACE ts_stock_index;',
sch.nspname, obj.relname index_name,
tab.relname table_name , tbs.spcname
,ind.* from pg_index ind
join pg_class obj on obj."oid" = ind.indexrelid
join pg_class tab on tab."oid" = ind.indrelid
join pg_namespace sch on sch."oid" = obj.relnamespace
left join pg_tablespace tbs on obj.reltablespace = tbs."oid"
where sch.nspname = 'stock'
and tbs.spcname is null;