Skip to content

Commit

Permalink
[Doc][YSQL][#6041] Adding documentation related to TServer flag "ysql…
Browse files Browse the repository at this point in the history
…_sequence_cache_minval". (#6182)
  • Loading branch information
emhna authored Oct 28, 2020
1 parent 5a51df4 commit 39d01a4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Change the current value of the sequence. If no value is specified, the current

Specify how many numbers from the sequence to cache in the client. Default is `1`.

When YB-TServer [ysql_sequence_cache_minval](../../../../../latest/reference/configuration/yb-tserver/#ysql-sequence-cache-minval) configuration flag is not explicitly turned off (set to `0`), the maximum value of the flag and the cache clause will be used.

#### OWNED BY *table_name.table_column* | NONE

It gives ownership of the sequence to the specified column (if any). This means that if the column (or the table to which it belongs to) is dropped, the sequence will be automatically dropped. If `NONE` is specified, any previous ownership will be deleted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ Specify the first value in the sequence. `start` cannot be less than `minvalue`.

Specify how many numbers from the sequence to cache in the client. Default is `1`.

When YB-TServer [ysql_sequence_cache_minval](../../../../../reference/configuration/yb-tserver/#ysql-sequence-cache-minval) configuration flag is not explicitly turned off (set to `0`), the maximum value of the flag and the cache clause will be used.

#### [ NO ] CYCLE

If `CYCLE` is spefified, the sequence will wrap around once it has reached `minvalue` or `maxvalue`. If `maxvalue` was reached, `minvalue` will be the next number in the sequence. If `minvalue` was reached (for a descending sequence), `maxvalue` will be the next number in a sequence. `NO CYCLE` is the default.
If `CYCLE` is specified, the sequence will wrap around once it has reached `minvalue` or `maxvalue`. If `maxvalue` was reached, `minvalue` will be the next number in the sequence. If `minvalue` was reached (for a descending sequence), `maxvalue` will be the next number in a sequence. `NO CYCLE` is the default.

## Cache

Expand Down
10 changes: 10 additions & 0 deletions docs/content/latest/reference/configuration/yb-tserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,16 @@ For details on how online index backfill works, see the [Online Index Backfill](

Default: `true`

##### --ysql_sequence_cache_minval

Specify the minimum number of sequence values to cache in the client for every sequence object.

To turn off the default size of cache flag, set the flag to `0`.

For details on the expected behaviour when used with the sequence cache clause, see the semantics under [CREATE SEQUENCE](../../../api/ysql/the-sql-language/statements/ddl_create_sequence/#cache-cache) and [ALTER SEQUENCE](../../../api/ysql/the-sql-language/statements/ddl_alter_sequence/#cache-cache) pages.

Default: `100`

##### --ysql_log_statement

Specifies the types of YSQL statements that should be logged.
Expand Down

0 comments on commit 39d01a4

Please sign in to comment.