DBA Hub

📋Steps in this guide1/1

Find wal file details and its size

-- List down all the wal files present in pg_wal

postgresql configurationintermediate
by PostgreSQL
13 views
1

Find wal file details and its size

-- List down all the wal files present in pg_wal -- Find total size of wal: -- Find current wal file lsn:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
postgres=#
select * from pg_ls_waldir();
name                     | size     | modification
------------------------------------------+----------+---------------------------
0000000100000079000000D5 | 16777216 | 22-APR-22 20:51:26 +03:00
0000000100000079000000D8 | 16777216 | 22-APR-22 20:39:33 +03:00
0000000100000079000000D6 | 16777216 | 22-APR-22 20:07:40 +03:00
0000000100000079000000D9 | 16777216 | 22-APR-22 20:47:21 +03:00
0000000100000079000000D7 | 16777216 | 22-APR-22 20:21:45 +03:00
00000001000000790000005C.00005BC8.backup | 323 | 21-APR-22 10:14:40 +03:00
(6 rows)
postgres=#
select sum(size) from pg_ls_waldir();
sum
----------
83886403
(1 row)
postgres=#
select pg_current_wal_insert_lsn(),pg_current_wal_lsn();
pg_current_wal_insert_lsn  | pg_current_wal_lsn
---------------------------+--------------------
79/D5980480                | 79/D5980480
(1 row)

Comments (0)

Please to add comments

No comments yet. Be the first to comment!