File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,13 +195,13 @@ $(TMUX_SCRIPT): bin
195195
196196tmux-script : $(TMUX_SCRIPT ) ;
197197
198- tmux-clean :
198+ tmux-clean : bin
199199 $(PG_AUTOCTL ) do tmux clean \
200200 --root $(TMUX_TOP_DIR) \
201201 --first-pgport $(FIRST_PGPORT) \
202202 --nodes $(NODES)
203203
204- tmux-session :
204+ tmux-session : bin
205205 $(PG_AUTOCTL ) do tmux session \
206206 --root $(TMUX_TOP_DIR) \
207207 --first-pgport $(FIRST_PGPORT) \
@@ -213,7 +213,11 @@ tmux-session:
213213 --binpath $(BINPATH) \
214214 --layout $(TMUX_LAYOUT)
215215
216- cluster : install tmux-clean tmux-session ;
216+ cluster : install tmux-clean
217+ # This is explicitly not a target, otherwise when make uses multiple jobs
218+ # tmux-clean and tmux-session can have a race condidition where tmux-clean
219+ # removes the files that are just created by tmux-session.
220+ $(MAKE ) tmux-session
217221
218222valgrind-session : build-test
219223 docker run \
Original file line number Diff line number Diff line change @@ -130,14 +130,19 @@ main(int argc, char **argv)
130130 * environment variable.
131131 */
132132 strlcpy (pg_autoctl_argv0 , argv [0 ], MAXPGPATH );
133- if (! get_env_copy ("PG_AUTOCTL_DEBUG_BIN_PATH" , pg_autoctl_program , MAXPGPATH ))
133+ if (env_exists ("PG_AUTOCTL_DEBUG_BIN_PATH" ))
134134 {
135- if (!set_program_absolute_path ( pg_autoctl_program , MAXPGPATH ))
135+ if (!get_env_copy ( "PG_AUTOCTL_DEBUG_BIN_PATH" , pg_autoctl_program , MAXPGPATH ))
136136 {
137137 /* errors have already been logged */
138138 exit (EXIT_CODE_INTERNAL_ERROR );
139139 }
140140 }
141+ else if (!set_program_absolute_path (pg_autoctl_program , MAXPGPATH ))
142+ {
143+ /* errors have already been logged */
144+ exit (EXIT_CODE_INTERNAL_ERROR );
145+ }
141146
142147 if (!commandline_run (& command , argc , argv ))
143148 {
You can’t perform that action at this time.
0 commit comments