Blessed be the Lord: for he hath showed me his marvellous kindness in a strong city. The "strong city" has been explained as Ziklag (Delitzsch), or Mahanaim (2 Samuel 17:24), but is probably as much a figure of speech as the "pavilion" of Psalms 31:20.
God has showed David his marvellous loving-kindness by giving him an assurance of absolute security.