Skip to main content

snowflake_node

Keeps track of all the current snowflake nodes in use

Primary Key:Checks:
  • snowflake_node_db_id_check - ((database_pid IS NULL) = (database_connection_started IS NULL))
  • snowflake_node_node_id_check - ((node_id >= 0) AND (node_id <= 1023))
ColumnData TypeNullableIndexedDescription
node_idsmallintNoYesUnique Snowflake ID used to prevent collisions with multiple nodes (also known as workers).

Generated through expression: 
start_timetimestamp with time zoneYesNoThe time when the node_id was acquired.

Generated through expression: 
last_updated_timetimestamp with time zoneYesNoUpdated every 30s while a node_id is being used by a worker. The node is considered stale after 30 minutes of no updates and the entry is evicted, ideally this is never used. 30m is double the expected possible idle period of 15m on Google Cloud stated here: https://cloud.google.com/run/docs/about-instance-autoscaling#:~:text=Cloud%20Run%20does%20not%20immediately,of%20a%20sudden%20traffic%20spike

Generated through expression: 
sourcetextNoNoWhere the node_id was registered from, for example "service/snowflake".

Generated through expression: 
database_connection_startedtimestamp with time zoneYesNoThe time the database connection was created start determined from pg_stat_activity.backend_start. See database_pid for more information.

Generated through expression: 
database_pidintegerYesNoThe PID of the database connection that acquired this Snowflake ID, only set for claims.acquire_snowflake_id. Database processes can't be relied on to refresh the last_updated_time of their rows because there may be very long waits and a background process to connect to the database is simply not feasible.

Generated through expression: