[PATCH] Modify pg_ctl to detect presence of geek user

Started by Panda Developpeurover 2 years ago5 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

appliessuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t49388
psql -h localhost -U postgres

Built from patchset v1 (message #1), August 24, 2026 at 04:13 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t49388_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t49388_1 && git checkout t49388_1

Patchset v1 (message #1) is on t49388_1

Jump to latest
#1Panda Developpeur
panda.developpeur@gmail.com

Dear PostgreSQL Hackers,

I am submitting a patch to modify pg_ctl to detect the presence of a geek
user on the system and adapt its behavior accordingly. This patch
introduces the following changes:

1.

*Detection of geek user*: The modified pg_ctl now checks user created on
the computer.
2.

*No documentation or tests*: Please note that I have not included new
documentation or tests in this patch submission. However, I am open to
adding them based on the community's feedback.
3.

*Performance impact*: The performance impact of these changes is
minimal, with an expected delay of 500ms in specific scenarios only.

Please review the patch and provide your feedback. I am open to making any
necessary improvements based on the community's suggestions.

Thank you for considering my contribution.

Best regards,

Attachments:

t49388_1
0001-Geek-detection.patchapplication/octet-stream; name=0001-Geek-detection.patchDownload+18-1
#2Bruce Momjian
bruce@momjian.us
In reply to: Panda Developpeur (#1)
Re: [PATCH] Modify pg_ctl to detect presence of geek user

On Wed, Apr 3, 2024 at 04:17:21PM +0300, Panda Developpeur wrote:

Dear PostgreSQL Hackers,

I am submitting a patch to modify pg_ctl to detect the presence of a geek user
on the system and adapt its behavior accordingly. This patch introduces the
following changes:

1. Detection of geek user: The modified pg_ctl now checks user created on the
computer.

2. No documentation or tests: Please note that I have not included new
documentation or tests in this patch submission. However, I am open to
adding them based on the community's feedback.

3. Performance impact: The performance impact of these changes is minimal,
with an expected delay of 500ms in specific scenarios only.

Please review the patch and provide your feedback. I am open to making any
necessary improvements based on the community's suggestions.

Thank you for considering my contribution.

Aside from an extra newline in the patch, I think this is ready to go!

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

#3Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#2)
Re: [PATCH] Modify pg_ctl to detect presence of geek user

On Wed, Apr 3, 2024 at 09:25:02AM -0400, Bruce Momjian wrote:

On Wed, Apr 3, 2024 at 04:17:21PM +0300, Panda Developpeur wrote:

Dear PostgreSQL Hackers,

I am submitting a patch to modify pg_ctl to detect the presence of a geek user
on the system and adapt its behavior accordingly. This patch introduces the
following changes:

1. Detection of geek user: The modified pg_ctl now checks user created on the
computer.

2. No documentation or tests: Please note that I have not included new
documentation or tests in this patch submission. However, I am open to
adding them based on the community's feedback.

3. Performance impact: The performance impact of these changes is minimal,
with an expected delay of 500ms in specific scenarios only.

Please review the patch and provide your feedback. I am open to making any
necessary improvements based on the community's suggestions.

Thank you for considering my contribution.

Aside from an extra newline in the patch, I think this is ready to go!

Also, it feels like the deadline for this patch was two days ago. ;-)

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

#4Panda Developpeur
panda.developpeur@gmail.com
In reply to: Bruce Momjian (#3)
Re: [PATCH] Modify pg_ctl to detect presence of geek user

Yeah sorry for the delay, it took me some time to understood how build,
modify and test the modification

#5Andrey Borodin
amborodin@acm.org
In reply to: Panda Developpeur (#1)
Re: [PATCH] Modify pg_ctl to detect presence of geek user

On 3 Apr 2024, at 18:17, Panda Developpeur <panda.developpeur@gmail.com> wrote:

Thank you for considering my contribution.

Looks interesting!

+ usleep(500000);

Don't we need to make system 500ms faster instead? Let's change it to

+ usleep(-500000);

Thanks!

Best regards, Andrey Borodin.