Remove palloc() call in ResWaitOnLock (#13701)
Remove palloc() call in ResWaitOnLock (#13701)

If palloc() failed in ResWaitOnLock due to OOM, it will trigger
a PANIC "Waiting on lock already held" because partitionLock is
not released correctly.

The first attempt is to add a try/catch surrounding for this
palloc() call, and release the partitionLock before rethrowing
error. But it is not good as ResIncrementRemove is not called.

So use local char new_status[160], length 160 is enough.

----

Steps to reproduce:

Add a fault at the palloc() position:
#ifdef FAULT_INJECTOR
    SIMPLE_FAULT_INJECTOR("reslock_acquire_before_wait");
#endif

```sql
-- superuser:
# CREATE USER test PASSWORD '123456';
# ALTER RESOURCE QUEUE pg_default WITH (ACTIVE_STATEMENTS=1);
# SELECT gp_inject_fault('reslock_acquire_before_wait', 'error', 1 /*master dbid*/);

-- test user session 1:
> SELECT pg_sleep(120);

-- test user session 2:
> SELECT version();
PANIC:  Waiting on lock already held! (lwlock.c:668)
server closed the connection unexpectedly
```
greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,lisakowen/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb