diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index b2fd4d02959..a8d2e7db1a1 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -374,8 +374,16 @@ typedef struct PGPROC ************************************************************************/ uint32 wait_event_info; /* proc's wait information */ -} PGPROC; +} +/* + * If compiler understands aligned pragma, use it to align the struct at cache + * line boundaries. This is just for performance, to avoid false sharing. + */ +#if defined(pg_attribute_aligned) + pg_attribute_aligned(PG_CACHE_LINE_SIZE) +#endif +PGPROC; extern PGDLLIMPORT PGPROC *MyProc;