Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Yasir <yasir(dot)hussain(dot)shah(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Date: 2024-07-19 18:32:47
Message-ID: CA+Tgmob71r4i-3WpOahdSGUVtxk4X=op6NVuctLOCrXz2qNRfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 16, 2024 at 8:04 AM Yasir <yasir(dot)hussain(dot)shah(at)gmail(dot)com> wrote:
> Please ignore the above 4 lines in my review. See my comments in blue.

OK, so I think it's unclear what the next steps are for this patch.

1. On June 3rd, Michael Paquier said that Tom Lane proposed that,
after doing what the patch currently does, we could simplify some
other stuff. The details are unclear, and Tom hasn't commented.

2. On June 29th, Noah Misch proposed a platform-independent way of
solving the problem.

3. On July 12th, Sutou Kouhei proposed using CreateProcess() to start
the postmaster instead of cmd.exe.

4. On July 16th, Yasir Shah said that he tested the patch and found
that the problem only exists in v17, not any prior release, which is
contrary to my understanding of the situation. He also proposed a
minor tweak to the patch itself.

So, as I see it, we have three possible ways forward here. First, we
could stick with the current patch, possibly with further work as per
[1] or adjustments as per [4]. Second, we could abandon the current
approach and adopt Noah's proposal in [2]. Third, we could possibly
abandon the current approach and adopt Sutou's proposal in [3]. I say
"possibly" because I can't personally assess whether this approach is
feasible.

I have some bias toward thinking that real patches are better than
imaginary ones, and that we ought to therefore think about committing
Horiguchi-san's actual patch to fix the actual problem rather than
worrying much about other hypothetical things that we could do. On the
other hand, I'm also not volunteering, among other reasons because I
am not knowledgeable enough about Windows. And, certainly, there is
some appeal to a platform-independent approach. But I feel like we're
not doing ourselves any favors by letting this patch sit for (checks
thread) 10 months when according to multiple reviewers, it works.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2024-07-19 18:41:50 Re: Incremental backup from a streaming replication standby fails
Previous Message Nathan Bossart 2024-07-19 17:13:21 Re: Remove dependence on integer wrapping