Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PostHog/duckgres
/ functions
Functions
5,901 in github.com/PostHog/duckgres
⨍
Functions
5,901
◇
Types & classes
803
↓ 4 callers
Method
RecordSuccessfulAuth
RecordSuccessfulAuth clears failed attempts for an IP after successful auth.
server/auth/ratelimit.go:196
↓ 4 callers
Method
Recv
()
controlplane/session_mgr_drain_test.go:499
↓ 4 callers
Function
RedactQueryLogWriterError
RedactQueryLogWriterError returns a log-safe error string for the privileged query-log writer. Writer failures can wrap DuckDB/DuckLake errors that ec
server/querylog_kafka_writer.go:421
↓ 4 callers
Method
RefreshOwnerEpochAtomic
RefreshOwnerEpochAtomic holds the per-worker epoch lock across the callback so the durable bump and the in-memory update appear atomic to concurrent r
controlplane/worker_mgr.go:127
↓ 4 callers
Function
RegisterCLIInputsFlags
RegisterCLIInputsFlags registers every CLIInputs-backed CLI flag onto fs and returns a harvest closure that — once fs.Parse has run — produces a fully
configresolve/cliflags.go:24
↓ 4 callers
Method
ReleaseIdleHotWorkers
ReleaseIdleHotWorkers parks idle (zero-session) Hot workers into hot_idle at drain start so the TTL reaper reclaims them instead of letting them linge
controlplane/control.go:261
↓ 4 callers
Method
ReleaseOrgConnectionLease
(leaseID string)
controlplane/connection_limiter.go:35
↓ 4 callers
Method
ReleaseWorker
ReleaseWorker decrements the active session count for a worker.
controlplane/worker_pool.go:62
↓ 4 callers
Method
Reload
Reload forces an immediate config reload from the database.
controlplane/configstore/store.go:1861
↓ 4 callers
Method
ReloadSnapshot
()
controlplane/admin/live.go:159
↓ 4 callers
Method
RequestRebalance
RequestRebalance signals that a rebalance is needed. Multiple rapid calls are coalesced — the actual rebalance runs at most once per debounce interval
controlplane/memory_rebalancer.go:107
↓ 4 callers
Method
ReservePID
ReservePID generates a new unique PID for a session.
controlplane/session_mgr.go:186
↓ 4 callers
Function
ResolveRuntimeContract
(defaultManifestPath string)
tests/perf/datasets/runtime.go:30
↓ 4 callers
Method
RetireWorkerIfNoSessions
RetireWorkerIfNoSessions retires a worker only if it has zero active sessions after releasing the caller's claim. Returns true if retired.
controlplane/worker_pool.go:69
↓ 4 callers
Method
Run
(ctx context.Context)
tests/perf/core/runner.go:51
↓ 4 callers
Method
SpawnWorker
SpawnWorker starts a new duckdb-service worker process. It uses a pre-bound socket from the pool if available, falling back to binding a new socket (w
controlplane/worker_mgr.go:349
↓ 4 callers
Method
State
State returns the worker's state at observation time.
controlplane/configstore/lifecycle_types.go:47
↓ 4 callers
Method
Validate
Validate checks that the lifecycle and assignment metadata are internally consistent.
controlplane/worker_state.go:96
↓ 4 callers
Method
WaitWarehouseReady
(ctx context.Context, orgID string, opts WaitOptions)
tests/scenario/provision/client.go:127
↓ 4 callers
Function
WriteAuthCleartextPassword
writeAuthCleartextPassword requests cleartext password
server/wire/protocol.go:217
↓ 4 callers
Function
WriteAuthOK
writeAuthOK sends authentication success
server/wire/protocol.go:210
↓ 4 callers
Function
WriteEmptyQueryResponse
writeEmptyQueryResponse sends an empty query response
server/wire/protocol.go:306
↓ 4 callers
Function
WriteReadyForQuery
writeReadyForQuery indicates the server is ready for a new query
server/wire/protocol.go:241
↓ 4 callers
Method
acquireConnectionSlot
(ctx context.Context, pid int32, username string, protocol string, profile *WorkerProfile)
controlplane/session_mgr.go:195
↓ 4 callers
Function
advisoryLockKey
(s string)
controlplane/configstore/store.go:1782
↓ 4 callers
Function
applyDuckLakePreAttachSettingsWith
(db duckLakeSQLExecer, loadPostgresScanner func() error, dlCfg DuckLakeConfig)
server/server.go:1453
↓ 4 callers
Function
auditSummary
(e: AuditEntry)
controlplane/admin/ui/src/lib/audit.ts:75
↓ 4 callers
Method
beginStream
()
server/flightsqlingress/ingress.go:1409
↓ 4 callers
Function
bindFrame
(portalName, stmtName string)
server/conn_skip_until_sync_test.go:91
↓ 4 callers
Function
cacheProxyHealthURL
cacheProxyHealthURL returns the health endpoint URL (empty if disabled).
duckdbservice/cache_proxy.go:40
↓ 4 callers
Method
calls
()
server/server_test.go:88
↓ 4 callers
Method
claimSpecificWorker
(ctx context.Context, workerID int, expectedOwnerEpoch int64, assignment *WorkerAssignment)
controlplane/k8s_pool_acquire.go:562
↓ 4 callers
Function
classifySnapshotMiss
classifySnapshotMiss returns the default reason label for a snapshot-fenced CAS miss. Without an extra round-trip to read the current row we cannot di
controlplane/worker_lifecycle.go:404
↓ 4 callers
Function
cleanupSessionState
cleanupSessionState drops temporary tables and views on the connection so that session-scoped state doesn't leak when the connection is returned to th
duckdbservice/service.go:1603
↓ 4 callers
Function
collectSink
collectSink returns a sink that streams the peer body into buf, mirroring how DiskCache.PutStream consumes it in production (without touching disk).
cmd/cache-proxy/peers_test.go:16
↓ 4 callers
Function
configureDuckLakeMetadataPool
(db duckLakeSQLExecer)
server/server.go:1489
↓ 4 callers
Function
copyOrg
(org *configstore.Org)
controlplane/admin/api_test.go:200
↓ 4 callers
Method
count
()
controlplane/janitor_leader_k8s_test.go:40
↓ 4 callers
Function
counterMetricValue
(t *testing.T, metricName string)
server/auth/policy_test.go:12
↓ 4 callers
Function
cpReplicaSetHash
cpReplicaSetHash extracts the Deployment ReplicaSet hash segment from a CP pod name ("duckgres-control-plane-6f877c7779-abcde" -> "6f877c7779"). A nam
controlplane/k8s_pool_helpers.go:157
↓ 4 callers
Method
createOrgStack
createOrgStack creates an isolated pool + session manager for an org.
controlplane/org_router.go:99
↓ 4 callers
Method
createRegexFuncCall
createRegexFuncCall creates a regexp_matches function call node For negated operators, wraps in NOT
transpiler/transform/operators.go:954
↓ 4 callers
Function
decodeBinaryCopy
decodeBinaryCopy decodes a binary COPY field, using field length to resolve type ambiguity. DuckDB's postgres extension may send different integer wid
server/conn_copy.go:1269
↓ 4 callers
Function
decodeFloat4
(data []byte)
server/types.go:941
↓ 4 callers
Function
decodeFloat8
(data []byte)
server/types.go:949
↓ 4 callers
Function
decodeInterval
decodeInterval decodes PostgreSQL binary INTERVAL (16 bytes) into an interval string.
server/types.go:626
↓ 4 callers
Function
decodeTime
decodeTime decodes int64 microseconds since midnight into a time string.
server/types.go:593
↓ 4 callers
Function
decodeTimestamp
(data []byte)
server/types.go:967
↓ 4 callers
Function
decodeUUID
decodeUUID decodes 16 raw bytes into a UUID string "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".
server/types.go:556
↓ 4 callers
Function
del
(path: string)
controlplane/admin/ui/src/lib/api.ts:104
↓ 4 callers
Method
deparseNode
deparseNode converts a node back to SQL string for use as a key
transpiler/transform/expandarray.go:475
↓ 4 callers
Function
dgOnly
dgOnly returns the Duckgres database
tests/integration/setup_test.go:409
↓ 4 callers
Function
dockerComposeArgs
(composeFile string, command string, args ...string)
tests/integration/harness.go:649
↓ 4 callers
Function
durationFromWith
(step core.Step, key string)
tests/scenario/provision/steps.go:240
↓ 4 callers
Function
effectiveDefaultWorkerTTL
effectiveDefaultWorkerTTL resolves the janitor's hot-idle retention: the operator default TTL (DUCKGRES_K8S_WORKER_DEFAULT_TTL → K8sConfig.WorkerDefau
controlplane/multitenant.go:38
↓ 4 callers
Function
encodeDate
(v interface{})
server/types.go:463
↓ 4 callers
Function
encodeJSON
encodeJSON re-serializes a Go value to JSON bytes. The Go DuckDB driver deserializes JSON columns into native Go types (json.Unmarshal: string→string
server/types.go:863
↓ 4 callers
Function
encodeText
(v interface{})
server/types.go:854
↓ 4 callers
Function
encodeTimestamp
(v interface{})
server/types.go:488
↓ 4 callers
Method
endStream
()
server/flightsqlingress/ingress.go:1413
↓ 4 callers
Method
ensureConnectionContext
()
server/conn.go:285
↓ 4 callers
Function
equalStrings
(a, b []string)
tests/scenario/core/runner_test.go:309
↓ 4 callers
Function
escapeDuckLakeConnStringValue
(value string)
controlplane/shared_worker_activator.go:644
↓ 4 callers
Function
every
(ms: number, fn: () => void)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:80
↓ 4 callers
Method
execConn
(ctx context.Context, query string, args ...any)
duckdbservice/service.go:351
↓ 4 callers
Method
execWithRecoveryLocked
(ctx context.Context, query string, args ...any)
server/flightsqlingress/ingress.go:1265
↓ 4 callers
Function
executeFrame
(portalName string)
server/conn_skip_until_sync_test.go:111
↓ 4 callers
Method
executeQueryDirect
executeQueryDirect executes a query directly against DuckDB without any transpilation. Used for passthrough users who send DuckDB-native SQL.
server/conn_query_exec.go:18
↓ 4 callers
Function
findSpan
findSpan returns the first recorded span with the given name, or fails.
cmd/cache-proxy/tracing_test.go:29
↓ 4 callers
Function
flightAuthContext
(username, password string)
tests/controlplane/flight_ingress_test.go:26
↓ 4 callers
Method
flightOrgFromContext
flightOrgFromContext resolves the org for a Flight session from the request context's SNI (the managed hostname). Used by orgRoutedSessionProvider to
controlplane/control.go:2032
↓ 4 callers
Function
fmtBytes
(n: number | null | undefined)
controlplane/admin/ui/src/lib/format.ts:42
↓ 4 callers
Function
fmtCpu
(mc: number)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:102
↓ 4 callers
Function
fmtMem
(b: number)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:103
↓ 4 callers
Function
freePort
freePort allocates a free TCP port by briefly listening on :0.
tests/controlplane/controlplane_test.go:311
↓ 4 callers
Method
getCR
getCR fetches a Duckling CR by its exact name — the warehouse row's duckling_name. The control plane never derives or re-maps the name.
controlplane/provisioner/k8s_client.go:233
↓ 4 callers
Method
getQuerySchema
(ctx context.Context, query string, tx *sql.Tx)
duckdbservice/service.go:436
↓ 4 callers
Method
handleBind
(body []byte)
server/conn_extended_query.go:921
↓ 4 callers
Method
handleDescribe
(body []byte)
server/conn_extended_query.go:211
↓ 4 callers
Function
hasSeg
hasSeg reports whether segs contains s.
controlplane/admin/audit.go:213
↓ 4 callers
Function
interpolateArgs
interpolateArgs performs simple positional argument interpolation for Flight SQL. Flight SQL's Execute doesn't support $1-style parameters natively, s
server/flightclient/flight_executor.go:897
↓ 4 callers
Function
isConnectionBroken
isConnectionBroken checks if an error indicates a broken connection (e.g., SSL connection closed, network error).
server/conn_errors.go:292
↓ 4 callers
Method
isExpandArrayFunc
isExpandArrayFunc checks if a function call is to _pg_expandarray
transpiler/transform/expandarray.go:461
↓ 4 callers
Function
isFetchForwardOnly
isFetchForwardOnly returns true if the FetchStmt direction is forward-compatible.
server/conn_cursor.go:137
↓ 4 callers
Method
isGenericSessionSchedulableWorkerLocked
(w *ManagedWorker)
controlplane/k8s_pool_acquire.go:843
↓ 4 callers
Function
isIdentCont
isIdentCont reports whether b can continue an SQL identifier.
transpiler/longident.go:340
↓ 4 callers
Function
isWorkerConnPoolTimeoutError
isWorkerConnPoolTimeoutError reports whether err is the worker-side "failed to obtain connection from pool" session-create failure (duckdbservice acqu
controlplane/session_mgr.go:472
↓ 4 callers
Function
keyA
keyA is the billing key most tests share: orgA's default team, standard source, an 8-vCPU/16-GiB worker.
controlplane/compute_meter_test.go:60
↓ 4 callers
Method
liveWorkerCountLocked
liveWorkerCountLocked returns the number of workers whose process is still running (done channel not closed) plus workers currently being spawned. Inc
controlplane/worker_mgr.go:901
↓ 4 callers
Function
loadOrCreateAccountKey
(path string)
server/tlscert/acme_dns.go:481
↓ 4 callers
Function
loadScenarioForRun
(path string)
tests/scenario/runner_test.go:497
↓ 4 callers
Method
logDroppedOnStop
(batchLen int)
server/querylog_kafka.go:292
↓ 4 callers
Function
looksJSON
looksJSON reports whether a node is syntactically JSON: a cast to json/jsonb, a JSON-returning json* function call (including the json_extract calls t
transpiler/transform/operators.go:656
↓ 4 callers
Method
managedHostnameHint
managedHostnameHint formats the configured ManagedHostnameSuffixes into a "<org-id>.dw.<env>.postwh.com" string suitable for user-facing error message
controlplane/control.go:795
↓ 4 callers
Function
mapDuckDBType
mapDuckDBType maps a DuckDB type name to PostgreSQL type info
server/types.go:148
↓ 4 callers
Function
matchPgCursorsQuery
matchPgCursorsQuery checks if a query is a pg_cursors lookup and extracts the cursor name. Returns the cursor name and true for literal queries, empty
server/conn_cursor.go:159
↓ 4 callers
Function
matchPgStatActivityQuery
matchPgStatActivityQuery returns true if a query references pg_stat_activity.
server/conn_pg_stat_activity.go:30
↓ 4 callers
Function
mergePeer
mergePeer is a small generic helper: it unmarshals each peer body into E and appends extract(E) to acc. Bodies that fail to parse are skipped (the pee
controlplane/admin/live_aggregate.go:111
↓ 4 callers
Function
metadataDiff
(migrated, gorm map[string]T)
tests/configstore/migrations_postgres_test.go:794
↓ 4 callers
Function
metricCounterValue
(t *testing.T, metricName string)
server/flightsqlingress/ingress_test.go:323
← previous
next →
801–900 of 5,901, ranked by callers