| From: | reid(dot)thompson(at)crunchydata(dot)com | 
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andres Freund <andres(at)anarazel(dot)de> | 
| Cc: | Tristan Partin <tristan(at)neon(dot)tech>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> | 
| Subject: | Re: Refactoring backend fork+exec code | 
| Date: | 2024-01-29 15:54:52 | 
| Message-ID: | 5997ff317a5827496537580078bcd19f4441f8d2.camel@crunchydata.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Thu, 2024-01-25 at 01:51 +0200, Heikki Linnakangas wrote:
> 
> And here we go. BackendID is now a 1-based index directly into the 
> PGPROC array.
> 
Would it be worthwhile to also note in this comment FIRST_AUX_PROC's
and IsAuxProcess()'s dependency on B_ARCHIVER and it's location in the
enum table?
      /*                                                                                                                              
      ¦* Auxiliary processes. These have PGPROC entries, but they are not                                                             
      ¦* attached to any particular database. There can be only one of each of                                                        
      ¦* these running at a time.                                                                                                     
      ¦*                                                                                                                              
      ¦* If you modify these, make sure to update NUM_AUXILIARY_PROCS and the                                                         
      ¦* glossary in the docs.                                                                                                        
      ¦*/                                                                                                                             
      B_ARCHIVER,                                                                                                                     
      B_BG_WRITER,                                                                                                                    
      B_CHECKPOINTER,                                                                                                                 
      B_STARTUP,                                                                                                                      
      B_WAL_RECEIVER,                                                                                                                 
      B_WAL_SUMMARIZER,                                                                                                               
      B_WAL_WRITER,                                                                                                                   
  } BackendType;                                                                                                                      
                                                                                                                                    
  #define BACKEND_NUM_TYPES (B_WAL_WRITER + 1)                        
                                                                                                                                      
  extern PGDLLIMPORT BackendType MyBackendType;                       
                                                                                                                                      
  #define FIRST_AUX_PROC B_ARCHIVER                                   
  #define IsAuxProcess(type)          (MyBackendType >= FIRST_AUX_PROC)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-01-29 15:59:06 | Re: PG versus libxml2 2.12.x | 
| Previous Message | David E. Wheeler | 2024-01-29 15:45:01 | Re: to_regtype() Raises Error |