dolthub / dolthub/doltgresql

Missing `TimeZone` ParameterStatus at startup and after `SET TIME ZONE`

Open
#3,364 0 comments 0 reactions 0 assignees View on GitHub
customer issue
Dominant language
Go
Stars
2.1k
Forks
73
Avg merge
1d 10h
Merged PRs (30d)
129

Description

Doltgres 1.3.2 does not report `TimeZone` through PostgreSQL’s ParameterStatus messages. `SHOW timezone` reflects session changes, but Psycopg’s `connection.info.parameter_status("TimeZone")` returns `None`.

Fetching a `timestamptz` value with `psycopg[binary]==3.3.5` also causes a segmentation fault.

### Repro

```bash
docker run --rm --name doltgres-repro \
-p 127.0.0.1:15432:5432 \
-e DOLTGRES_USER=testuser \
-e DOLTGRES_PASSWORD=testpassword \
dolthub/doltgresql:1.3.2
```

Run with `psycopg[binary]==3.3.5`:

```python
import psycopg

with psycopg.connect(
host="127.0.0.1",
port=15432,
user="testuser",
password="testpassword",
dbname="testuser",
autocommit=True,
) as conn:
print("Doltgres:", conn.execute("SELECT dolt_version()").fetchone(), flush=True)
print("Initial TimeZone:", conn.info.parameter_status("TimeZone"), flush=True)

for zone in ("UTC", "America/New_York"):
conn.execute(f"SET TIME ZONE '{zone}'")
print("SHOW timezone:", conn.execute("SHOW timezone").fetchone(), flush=True)
print("TimeZone status:", conn.info.parameter_status("TimeZone"), flush=True)

conn.execute("SET TIME ZONE 'UTC'")
print(
conn.execute("SELECT '2000-01-01 12:00:00+00'::timestamptz").fetchone(),
flush=True,
)
```

Returns:

```text
Doltgres: ('1.3.2',)
Initial TimeZone: None
SHOW timezone: ('UTC',)
TimeZone status: None
SHOW timezone: ('America/New_York',)
TimeZone status: None
```

The final `timestamptz` fetch terminates Python with `SIGSEGV`.

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Docker and psycopg reproduction to confirm both symptoms. Trace the startup and SET TIME ZONE handling for PostgreSQL ParameterStatus messages, then investigate the timestamptz fetch path. Done means TimeZone is reported initially and after changes, and the timestamptz query no longer terminates the client with SIGSEGV.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql, python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.