Skip to content

add ID to client object#1172

Merged
eulerto merged 12 commits intopgbouncer:masterfrom
AndrewJackson2020:client_ir
Oct 11, 2024
Merged

add ID to client object#1172
eulerto merged 12 commits intopgbouncer:masterfrom
AndrewJackson2020:client_ir

Conversation

@AndrewJackson2020
Copy link
Contributor

@AndrewJackson2020 AndrewJackson2020 commented Sep 20, 2024

This PR adds a numeric identifier to the PgSocket struct which can be used as a unique identifier for clients. Currently the unique identifier that pgbouncer uses is the pointer address of the struct, this suffices as a point in time identifier but over time these addresses are reused because of the dynamics of slab allocation.

This PR could help address a potential issue with #1147.

@AndrewJackson2020 AndrewJackson2020 changed the title add uid to client object add ID to client object Sep 20, 2024
@AndrewJackson2020
Copy link
Contributor Author

AndrewJackson2020 commented Sep 22, 2024

Rebased this PR to include the kill_client functionality. Also converted the kill_client functionality to use the numeric id implemented in this PR instead of the client pointer.

@eulerto
Copy link
Member

eulerto commented Oct 10, 2024

@AndrewJackson2020 It seems in good shape. I'll give another look and merge it soon.

@AndrewJackson2020
Copy link
Contributor Author

@AndrewJackson2020 It seems in good shape. I'll give another look and merge it soon.

Great to hear, thank you.

@eulerto eulerto merged commit 1759ec7 into pgbouncer:master Oct 11, 2024
@AndrewJackson2020 AndrewJackson2020 deleted the client_ir branch October 22, 2024 16:54
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