Verse 8 gives a present testimony. David declared his relationship to the Lord in terms of his love for God's house. He is speaking of a place of true worship, a place where God's honour was upheld, a place that God could bless with His presence in a special way. This life of communion with God also meant David refused those worship places that did not honour the Lord. "I have hated the congregation of evil doers; and will not sit with the wicked" (Psalm 26:5).
Verse 9 gives his future expectation. He looked for salvation from that judgment of God that would overtake sinners. Death is compared to a harvest, but there are two different gatherings. "Gather ye together first the tares, and bind them in bundles to burn them: but gather the wheat into my barn" (Matthew 13:30c). David looked to be gathered with the children of God. Where do you fit into this harvest?
The connection between verses 8 and 9 is clear. A walk with God in this world will end with the last step taking God's child to His house above. Jesus confirmed this truth in Matthew 7:14 when He said "narrow is the way, which leadeth unto life". The narrow path of holiness is the road that ends in heaven. There is no need for surprise or mystery about your eternity. "The desire of the righteous is only good: but the expectation of the wicked is wrath" (Proverbs 11:23).
The only thing remaining to make clear is Jesus' instruction about how to get on that narrow road. In Matthew 7 we read, "enter ye in at the strait (narrow) gate". We must get off the broad road that leads to destruction by going through the narrow gate. We need a personal experience of salvation to set us on the road to heaven. Jesus is this narrow gate. One at a time we must repent of our sins and receive Him as our Lord and Saviour. We are never taught in the Bible to trust our own works, but to trust His work of dying for our sins on the cross and rising again to be the living Saviour.