From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: true serializability and predicate locking |
Date: | 2010-01-07 21:00:04 |
Message-ID: | 603c8f071001071300l78daaa7bhfa5fb3168ca1b2ad@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 7, 2010 at 3:43 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
>> Kevin Grittner wrote:
>>> Another interesting thing which crossed my mind (and I should
>>> probably add a section for such things in the wiki) is that,
>>> given the overhead and conflict implications of using table scans
>>> in serializable transactions, we should perhaps try to discourage
>>> table scans from being chosen for those using serializable
>>> transactions. I figure we can probably fudge this to a workable
>>> degree by adjusting tuple cost GUCs, but if you wanted to think
>>> about this issue in more depth, it might be useful.
>>
>> I don't know if that's a good idea.
>> It's an attempt to guess what the user really wanted,
>
> No, it's an attempt to reflect the difference in costs for true
> serializable transactions, so that the optimizer can choose a plan
> appropriate for that mode, versus some other. In serializable
> transaction isolation there is a higher cost per tuple read, both
> directly in locking and indirectly in increased rollbacks; so why
> lie to the optimizer about it and say it's the same?
I don't think this necessarily is a bad idea, but thinking that
fudging the tuple cost GUCs is going to work seems unrealistically
optimistic. If you need the optimizer to know about this, you need
the optimizer to REALLY know about this...
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-01-07 21:01:31 | Re: Serializable Isolation without blocking |
Previous Message | Devrim GÜNDÜZ | 2010-01-07 20:59:11 | Re: Streaming replication and postmaster signaling |