Saturday, 23 October 2021

Output format in PostgreSQL

 \x on


postgres=# select * from pg_stat_bgwriter ;
 checkpoints_timed | checkpoints_req | checkpoint_write_time | checkpoint_sync_time | buffers_checkpoint | buffers_clean | maxwritten_clean | buffers_backend | buffers_backend_fsync | buffe
rs_alloc |           stats_reset
-------------------+-----------------+-----------------------+----------------------+--------------------+---------------+------------------+-----------------+-----------------------+------
---------+----------------------------------
               640 |               2 |                  5565 |                    2 |                 58 |             0 |                0 |               2 |                     0 |
     527 | 2021-09-24 23:23:23.434226+05:30
(1 row)


postgres=# \x on
Expanded display is on.



postgres=#
postgres=#
postgres=# select * from pg_stat_bgwriter ;
-[ RECORD 1 ]---------+---------------------------------
checkpoints_timed     | 640
checkpoints_req       | 2
checkpoint_write_time | 5565
checkpoint_sync_time  | 2
buffers_checkpoint    | 58
buffers_clean         | 0
maxwritten_clean      | 0
buffers_backend       | 2
buffers_backend_fsync | 0
buffers_alloc         | 528
stats_reset           | 2021-09-24 23:23:23.434226+05:30


No comments:

Post a Comment

Master and Slave - Sync check - PostgreSQL

  1) Run the below Query on Primary:- SELECT     pid,     usename,     application_name,     client_addr,     state,     sync_state,     sen...