Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have found that selects will actually generate WAL records upon commit. Are there other costs to committing a select?

Are there costs due to an abort? If so, which has more?

What would be the negative consequences of always aborting prepared statements consisting only of a single select?

share|improve this question
1  
AFAIK the writes you're talking about - hint-bit setting, in particular - aren't transactional and don't go through WAL. So they can't be rolled back. But I haven't looked in detail, not sure. –  Craig Ringer Jul 4 at 4:32
    
@CraigRinger Thank you Craig Ringer! I've edited to hopefully be more clear of my intent. –  Cincinnatus Jul 4 at 14:47
    
Good question. If no real txid gets assigned, there's no difference. If a real txid gets assigned (so pg_clog gets written to) ... unsure. I'd need to test / ask -hackers / bug a smarter colleague. I suggest asking on #postgresql IRC; at the right times of day you'll get people who may know more. If you find out something useful, follow up here. –  Craig Ringer Jul 4 at 16:32
    
@CraigRinger Will do! Thank you Craig Ringer! –  Cincinnatus Jul 4 at 16:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.