Skip to content

feat: add three-state secure option (on/off/auto) for TLS control#227

Open
x4m wants to merge 1 commit intoClickHouse:mainfrom
postgredients:feat/secure-tls-option
Open

feat: add three-state secure option (on/off/auto) for TLS control#227
x4m wants to merge 1 commit intoClickHouse:mainfrom
postgredients:feat/secure-tls-option

Conversation

@x4m
Copy link
Copy Markdown

@x4m x4m commented Apr 28, 2026

Hi!

Today TLS is chosen over non-obvious heuristics. Maybe let's give a user explicit control over it?

(I'll drop changes to .github/workflows/* after discussion, I needed them for debug)

Comment on lines +40 to +42
- name: Show regression diffs (DSO)
if: failure()
run: cat regression.diffs || true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary; pg-build-test does it.

Copy link
Copy Markdown
Collaborator

@theory theory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful, thank you @x4m. I think we can drop the ch_ prefix where the other properties or parameters don't use it, and I'm not sure the test uploading stuff is necessary (and the cat calls are not), but otherwise it looks great!

Comment on lines +56 to +58
- name: Show regression diffs (Static)
if: failure()
run: cat regression.diffs || true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary.

Comment thread src/include/engine.h
char *username;
char *password;
char *dbname;
ch_tls_mode tls; /* TLS mode; CH_TLS_AUTO when not specified */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the ch_ prefix here; the struct already has it.

Comment thread src/include/fdw.h
chfdw_extract_options(List * defelems, char **driver, char **host, int *port,
char **dbname, char **username, char **password);
char **dbname, char **username, char **password,
ch_tls_mode * tls);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ch_tls_mode * tls);
tls_mode * tls);

Comment thread src/option.c
chfdw_extract_options(List * defelems, char **driver, char **host, int *port,
char **dbname, char **username, char **password)
char **dbname, char **username, char **password,
ch_tls_mode * tls)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ch_tls_mode * tls)
tls_mode * tls)

Comment on lines +43 to +50
- name: Upload actual results (DSO)
if: failure()
uses: actions/upload-artifact@v4
with:
name: regression-results-pg${{ matrix.pg }}-${{ matrix.os.arch }}-dso
path: |
regression.diffs
results/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always look at the logs for result output. What does this achieve?

@theory theory self-assigned this May 1, 2026
@theory theory added the drivers Improve binary and/or http driver support label May 1, 2026
@theory theory self-requested a review May 1, 2026 02:32
Copy link
Copy Markdown
Collaborator

@theory theory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, also need to update the binary driver connection stuff in ch_binary_connect() and document the new option.

Comment thread src/include/engine.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drivers Improve binary and/or http driver support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants