File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -365,10 +365,16 @@ search_be_status(int pid)
365
365
366
366
for (beid = 1 ; beid <= pgstat_fetch_stat_numbackends (); beid ++ )
367
367
{
368
- #if PG_VERSION_NUM >= 170000
369
- PgBackendStatus * be_status = pgstat_get_beentry_by_proc_number (beid );
370
- #elif PG_VERSION_NUM >= 160000
371
- PgBackendStatus * be_status = pgstat_get_beentry_by_backend_id (beid );
368
+ #if PG_VERSION_NUM >= 160000
369
+ LocalPgBackendStatus * lbe_status = pgstat_get_local_beentry_by_index (beid );
370
+ PgBackendStatus * be_status ;
371
+
372
+ Assert (lbe_status );
373
+ #ifndef PGPRO_STD
374
+ be_status = & lbe_status -> backendStatus ;
375
+ #else
376
+ be_status = lbe_status -> backendStatus ;
377
+ #endif
372
378
#else
373
379
PgBackendStatus * be_status = pgstat_fetch_stat_beentry (beid );
374
380
#endif
You can’t perform that action at this time.
0 commit comments