SET SESSION GRACEPERIOD

Sets how long a session socket remains blocked while awaiting client input or output for a given query.

Sets how long a session socket remains blocked while awaiting client input or output for a given query. If the socket is blocked for a continuous period that exceeds the grace period setting, the server shuts down the socket and throws a fatal error. The session is then terminated. If no grace period is set, the query can maintain its block on the socket indefinitely.

Vertica applies a session's grace period and RUNTIMECAP settings independently. If no grace period is set, a query can continue to block indefinitely on a session socket, regardless of the query's RUNTIMECAP setting.

Syntax

SET SESSION GRACEPERIOD duration

Parameters

duration
Specifies how long a query can block on any session socket, one of the following:
  • 'interval': Specifies as an interval the maximum grace period for current session queries, up to 20 days.

  • =DEFAULT: Sets the grace period for queries in this session to the user's GRACEPERIOD value. A new session is initially set to this value.

  • NONE: Valid only for superusers, removes any grace period previously set on session queries.

Privileges

  • Superusers can increase session grace period to any value, regardless of database or node settings.

  • Non-superusers can only set the session grace period to a value equal to or lower than their own user setting. If no grace period is explicitly set for a user, the grace period for that user is inherited from the node or database settings.

Examples

See Handling session socket blocking in the Administrator's Guide.