Skip to content

Observability: pxf_stat_activity and pxf_cancel_backend#124

Draft
ostinru wants to merge 1 commit into
apache:mainfrom
ostinru:pxf_stat_activity
Draft

Observability: pxf_stat_activity and pxf_cancel_backend#124
ostinru wants to merge 1 commit into
apache:mainfrom
ostinru:pxf_stat_activity

Conversation

@ostinru

@ostinru ostinru commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Add pxf_stat_activity

Add pxf_stat_activity to help DBAs find out what happening inside PXF server.

postgres=# select * from pxf_stat_activity ;
-[ RECORD 1 ]-+---------------------------------------------------------
segment_id    | 1
session_id    | 57997
command_count | 8
xid           | 57997-0000000008
operation     | READ_BRIDGE
usename       | gpadmin
server        | ostinru-test
profile       | s3:parquet
schema_name   | public
table_name    | test_blob_read
data_source   | ostinru-test/topics/cuscom.email.created.v1/2026-05-29/*
query_start   | 2026-06-23 16:16:48.318+03
pxf_host      | example.com

Add pxf_cancel_backend and pxf_interrupt_backend

Add pxf_cancel_backend and pxf_interrupt_backend to allow killing running queries.

Update tests

  1. Update pxfExtension tests - use testconatiners.
  2. Explicitly define extension version. So, there is no need in sql file manipulations.

@ostinru ostinru requested a review from leborchuk July 10, 2026 18:35
@ostinru

ostinru commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

Moved test-related code to separate PR #125 in order to keep PR focused.

Comment thread fdw/pxf_stat_activity.c
elog(DEBUG2, "pxf_stat_activity: segment %d requesting %s",
GpIdentity.segindex, uri.data);

handle = churl_init_download(uri.data, headers);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't we check here that there are no curl errors and everything was smoothly inited?

hawq code https://github.com/apache/hawq/blob/master/src/backend/access/external/pxfutils.c#L122C3-L122C57 contains call churl_read_check_connectivity(client_context->handle); I suggest do the similar check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants