# Taming PostgreSQL GUC "extra" Data

DevFeed: [Taming PostgreSQL GUC "extra" Data](<https://devfeed.tech/articles/taming-postgresql-guc-extra-data-5589.md>)

Original publisher: [Read original article](<https://clickhouse.com/blog/taming-postgres-guc-extra-data>)

Author: David Wheeler

Published: 2025-12-18T00:00:00Z

Content type: article

Language: en

Sources: [ClickHouse Blog](<https://devfeed.tech/sources/clickhouse-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [Code](<https://devfeed.tech/topics/code.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [code](<https://devfeed.tech/tags/code.md>), [internals](<https://devfeed.tech/tags/internals.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This article explains how pg_clickhouse optimized a PostgreSQL GUC that passes key/value session settings to ClickHouse. It describes replacing per-query string parsing with pre-parsed data stored when the setting is assigned, and discusses the PostgreSQL GUC API, memory allocation, validation, and assignment hooks involved in the implementation.

## Source excerpt

Postgres