Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a4012a6

Browse files
Rename static function to avoid conflicting names
Commit a4fd3aa moved setup_cancel_handler out of psql and exporeted it as a global function. While pg_dump isn't using the header it's exported in, having a conflicting name still risks causing confusion when grepping the code for callsites, so rename the static function in pg_dump to avoid this. Author: Yugo Nagata <nagata@sraoss.co.jp> Discussion: https://postgr.es/m/20240126094245.cf6718cc659273765f3ab69a@sraoss.co.jp
1 parent 1e285a5 commit a4012a6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/pg_dump/parallel.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static ParallelSlot *GetMyPSlot(ParallelState *pstate);
204204
static void archive_close_connection(int code, void *arg);
205205
static void ShutdownWorkersHard(ParallelState *pstate);
206206
static void WaitForTerminatingWorkers(ParallelState *pstate);
207-
static void setup_cancel_handler(void);
207+
static void set_cancel_handler(void);
208208
static void set_cancel_pstate(ParallelState *pstate);
209209
static void set_cancel_slot_archive(ParallelSlot *slot, ArchiveHandle *AH);
210210
static void RunWorker(ArchiveHandle *AH, ParallelSlot *slot);
@@ -550,7 +550,7 @@ sigTermHandler(SIGNAL_ARGS)
550550
/*
551551
* Some platforms allow delivery of new signals to interrupt an active
552552
* signal handler. That could muck up our attempt to send PQcancel, so
553-
* disable the signals that setup_cancel_handler enabled.
553+
* disable the signals that set_cancel_handler enabled.
554554
*/
555555
pqsignal(SIGINT, SIG_IGN);
556556
pqsignal(SIGTERM, SIG_IGN);
@@ -605,7 +605,7 @@ sigTermHandler(SIGNAL_ARGS)
605605
* Enable cancel interrupt handler, if not already done.
606606
*/
607607
static void
608-
setup_cancel_handler(void)
608+
set_cancel_handler(void)
609609
{
610610
/*
611611
* When forking, signal_info.handler_set will propagate into the new
@@ -705,7 +705,7 @@ consoleHandler(DWORD dwCtrlType)
705705
* Enable cancel interrupt handler, if not already done.
706706
*/
707707
static void
708-
setup_cancel_handler(void)
708+
set_cancel_handler(void)
709709
{
710710
if (!signal_info.handler_set)
711711
{
@@ -737,7 +737,7 @@ set_archive_cancel_info(ArchiveHandle *AH, PGconn *conn)
737737
* important that this happen at least once before we fork off any
738738
* threads.
739739
*/
740-
setup_cancel_handler();
740+
set_cancel_handler();
741741

742742
/*
743743
* On Unix, we assume that storing a pointer value is atomic with respect

0 commit comments

Comments
 (0)