From: | Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: [ODBC] getting rid of SnapshotNow |
Date: | 2013-07-20 00:04:06 |
Message-ID: | 51E9D3F6.4040203@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-odbc |
(2013/07/20 1:11), Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
>> On 2013-07-20 00:49:11 +0900, Hiroshi Inoue wrote:
>>> Using SnapshotSelf instead of SnapshotNow for currtid_ () wouldn't
>>> matter.
>
>> I think it actually might. You could get into dicey situations if you
>> use currtid_ in a query performing updates or inserts because it would
>> see the to-be-inserted tuple...
>
> I'm pretty sure Hiroshi-san was only opining about whether it would
> matter for ODBC's usage. IIUC, ODBC is using this function to re-fetch
> rows that it inserted, updated, or at least selected-for-update in a
> previous command of the current transaction, so actually any snapshot
> would do fine.
>
> In any case, since I moved the goalposts by suggesting that SnapshotSelf
> is just as dangerous as SnapshotNow, what we need to know is whether
> it'd be all right to change this code to use a fresh MVCC snapshot;
> and if not, why not. It's pretty hard to see a reason why client-side
> code would want to make use of the results of a non-MVCC snapshot.
OK I agree to replace SnapshotNow for currtid_xx() by a MVCC-snapshot.
regards,
Hiroshi Inoue
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2013-07-20 00:12:16 | Re: CREATE EVENT TRIGGER syntax |
Previous Message | Tom Lane | 2013-07-19 23:34:14 | Re: Preventing tuple-table leakage in plpgsql |
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2013-07-20 00:12:45 | Re: Fwd: configure: error: unixODBC library "odbcinst" not found while trying to compile odbc |
Previous Message | Alvaro Herrera | 2013-07-19 17:20:17 | Re: [HACKERS] getting rid of SnapshotNow |