SELECT row_to_json(T) FROM (
  SELECT checkpoints_timed,
    checkpoints_req,
    checkpoint_write_time,
    checkpoint_sync_time,
    buffers_checkpoint AS buffers_checkpoint,
    buffers_clean AS buffers_clean,
    maxwritten_clean,
    buffers_backend AS buffers_backend,
    buffers_backend_fsync,
    buffers_alloc AS buffers_alloc
  FROM pg_stat_bgwriter) T