diff --git a/product_docs/docs/pgd/5/sequences.mdx b/product_docs/docs/pgd/5/sequences.mdx index 12da76b6fbe..a588a03668f 100644 --- a/product_docs/docs/pgd/5/sequences.mdx +++ b/product_docs/docs/pgd/5/sequences.mdx @@ -304,10 +304,10 @@ the next value. ```sql -- determine highest sequence value across all nodes SELECT max((x->'response'->'command_tuples'->0->>'nextval')::bigint) - FROM json_array_elements( + FROM jsonb_array_elements( bdr.run_on_all_nodes( E'SELECT nextval(\'public.sequence\');' - )::jsonb AS x; + )::jsonb) AS x; -- turn into a galloc sequence SELECT bdr.alter_sequence_set_kind('public.sequence'::regclass, 'galloc', $MAX + $MARGIN);