> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# configurações de sessão create_*

> Configurações de sessão do ClickHouse no grupo create_*.

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["Versão", "Valor padrão", "Comentário"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        Histórico de versões
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Tipo</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Padrão</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Pode ser alterado sem reiniciar
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

Essas configurações estão disponíveis em [system.settings](/pt-BR/reference/system-tables/settings) e são geradas automaticamente a partir do [código-fonte](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## create\_if\_not\_exists

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.9"},{"label": "0"},{"label": "Nova configuração."}]}]} />

Ativa `IF NOT EXISTS` na instrução `CREATE` por padrão. Se esta configuração ou `IF NOT EXISTS` estiver especificado e já existir uma tabela com o nome informado, nenhuma exceção será lançada.

## create\_index\_ignore\_unique

<SettingsInfoBlock type="Bool" default_value="0" />

Ignora a palavra-chave UNIQUE em CREATE UNIQUE INDEX. Criado para testes de compatibilidade com SQL.

## create\_replicated\_merge\_tree\_fault\_injection\_probability

<SettingsInfoBlock type="Float" default_value="0" />

A probabilidade de ocorrer uma injeção de falha durante a criação da tabela, após a criação dos metadados no ZooKeeper

## create\_table\_empty\_primary\_key\_by\_default

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.11"},{"label": "1"},{"label": "Melhor usabilidade"}]}]} />

Permite criar tabelas \*MergeTree com chave primária vazia quando ORDER BY e PRIMARY KEY não forem especificados

## create\_token\_default\_ttl\_seconds

<SettingsInfoBlock type="UInt64" default_value="1800" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "1800"},{"label": "Nova configuração que define um ciclo de vida para um token criado por `CREATE TOKEN` sem uma cláusula explícita `VALID UNTIL` ou `VALID FOR`. A instrução é nova, portanto não há comportamento anterior a restaurar, e o valor anterior é o próprio padrão: usar `compatibility` com uma versão mais antiga não deve fazer com que os tokens deixem de expirar."}]}]} />

O ciclo de vida, em segundos, de um token criado por [`CREATE TOKEN`](/pt-BR/reference/statements/create/token) que não especifica sua própria cláusula `VALID UNTIL` ou `VALID FOR`. O padrão é 30 minutos; portanto, um token para o qual não foi solicitada uma duração maior tem curta duração.

Valores possíveis:

* Inteiro positivo — o token expira essa quantidade de segundos após ser criado.
* 0 — um token sem cláusula explícita nunca expira.

Esta é apenas uma configuração padrão. Uma cláusula explícita `VALID UNTIL` ou `VALID FOR` na consulta sempre prevalece, incluindo `VALID UNTIL 'infinity'`, que cria um token que nunca expira, independentemente dessa configuração.
