Re: Cleanup: PGProc->links doesn't need to be the first field anymore

2024-07-05 Thread Heikki Linnakangas
On 04/07/2024 23:20, Andres Freund wrote: On 2024-07-04 01:54:18 +0300, Heikki Linnakangas wrote: I believe that was just an oversight. Trivial patch attached. Oops. Yes, I clearly should have used dlist_container() here. Committed, thanks. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Cleanup: PGProc->links doesn't need to be the first field anymore

2024-07-04 Thread Andres Freund
Hi, On 2024-07-04 01:54:18 +0300, Heikki Linnakangas wrote: > pgproc.h has this: > > > struct PGPROC > > { > > /* proc->links MUST BE FIRST IN STRUCT (see ProcSleep,ProcWakeup,etc) */ > > dlist_node links; /* list link if process is in a > > list */ > > dlist_he

Re: Cleanup: PGProc->links doesn't need to be the first field anymore

2024-07-04 Thread Aleksander Alekseev
Hi Heikki, > I tried moving it and ran the regression tests. That revealed one place > where we still don't use dlist_container: > > > if (!dlist_is_empty(procgloballist)) > > { > > MyProc = (PGPROC *) dlist_pop_head_node(procgloballist); > > ... > > I believe that was ju