

# aurora\_stat\_memctx\_usage
<a name="aurora_stat_memctx_usage"></a>

각 PostgreSQL 프로세스의 메모리 컨텍스트 사용량을 보고합니다.

## 구문
<a name="aurora_stat_memctx_usage-syntax"></a>

```
aurora_stat_memctx_usage()
```

## 인수
<a name="aurora_stat_memctx_usage-arguments"></a>

없음

## 반환 타입
<a name="aurora_stat_memctx_usage-return-type"></a>

다음 열이 있는 SETOF 레코드:
+ `pid` - 프로세스의 ID입니다.
+ `name` - 메모리 컨텍스트의 이름입니다.
+ `allocated` - 메모리 컨텍스트가 기본 메모리 하위 시스템에서 가져온 바이트 수입니다.
+ `used` - 메모리 컨텍스트의 클라이언트에 커밋된 바이트 수입니다.
+ `instances` - 이 유형의 현재 존재하는 컨텍스트 수입니다.

## 사용 노트
<a name="aurora_stat_memctx_usage-usage-notes"></a>

이 함수는 PostgreSQL 프로세스의 메모리 컨텍스트 사용량을 표시합니다. 일부 프로세스에는 `anonymous`라는 레이블이 지정되어 있습니다. 프로세스는 제한된 키워드를 포함하므로 노출되지 않습니다.

이 함수는 다음 Aurora PostgreSQL 버전 이상에서 사용할 수 있습니다.
+ 15.3 이상의 15 버전
+ 14.8 이상의 14 버전
+ 13.11 이상의 13 버전
+ 12.15 이상의 12 버전
+ 11.20 이상의 11 버전

## 예시
<a name="aurora_stat_memctx_usage-examples"></a>

다음 예제에서는 `aurora_stat_memctx_usage` 함수 호출의 결과를 보여줍니다.

```
=> SELECT * 
     FROM aurora_stat_memctx_usage();
  
    pid| name                            | allocated |   used  | instances 
-------+---------------------------------+-----------+---------+-----------
123864 | Miscellaneous                   |     19520 |   15064 |         3 
123864 | Aurora File Context             |      8192 |     616 |         1 
123864 | Aurora WAL Context              |      8192 |     296 |         1 
123864 | CacheMemoryContext              |    524288 |  422600 |         1 
123864 | Catalog tuple context           |     16384 |   13736 |         1 
123864 | ExecutorState                   |     32832 |   28304 |         1 
123864 | ExprContext                     |      8192 |    1720 |         1 
123864 | GWAL record construction        |      1024 |     832 |         1 
123864 | MdSmgr                          |      8192 |     296 |         1 
123864 | MessageContext                  |    532480 |  353832 |         1 
123864 | PortalHeapMemory                |      1024 |     488 |         1 
123864 | PortalMemory                    |      8192 |     576 |         1 
123864 | printtup                        |      8192 |     296 |         1 
123864 | RelCache hash table entries     |      8192 |    8152 |         1 
123864 | RowDescriptionContext           |      8192 |    1344 |         1 
123864 | smgr relation context           |      8192 |     296 |         1 
123864 | Table function arguments        |      8192 |     352 |         1 
123864 | TopTransactionContext           |      8192 |     632 |         1 
123864 | TransactionAbortContext         |     32768 |     296 |         1 
123864 | WAL record construction         |     50216 |   43904 |         1 
123864 | hash table                      |     65536 |   52744 |         6 
123864 | Relation metadata               |    191488 |  124240 |        87 
104992 | Miscellaneous                   |      9280 |    7728 |         3 
104992 | Aurora File Context             |      8192 |     376 |         1 
104992 | Aurora WAL Context              |      8192 |     296 |         1 
104992 ||Autovacuum Launcher             |      8192 |     296 |         1 
104992 | Autovacuum database list        |     16384 |     744 |         2 
104992 | CacheMemoryContext              |    262144 |  140288 |         1 
104992 | Catalog tuple context           |      8192 |     296 |         1 
104992 | GWAL record construction        |      1024 |     832 |         1 
104992 | MdSmgr                          |      8192 |     296 |         1 
104992 | PortalMemory                    |      8192 |     296 |         1 
104992 | RelCache hash table entries     |      8192 |     296 |         1 
104992 | smgr relation context           |      8192 |     296 |         1 
104992 | Autovacuum start worker (tmp)   |      8192 |     296 |         1 
104992 | TopTransactionContext           |     16384 |     592 |         2 
104992 | TransactionAbortContext         |     32768 |     296 |         1 
104992 | WAL record construction         |     50216 |   43904 |         1 
104992 | hash table                      |     49152 |   34024 |         4 
(39 rows)
```

일부 제한된 키워드는 숨겨지고 출력은 다음과 같이 표시됩니다.

```
postgres=>SELECT * 
     FROM aurora_stat_memctx_usage();
   
    pid| name                            | allocated |   used  | instances 
-------+---------------------------------+-----------+---------+-----------
  5482 | anonymous                       |      8192 |     456 |         1 
  5482 | anonymous                       |      8192 |     296 |         1
```