| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: age(xid) on hot standby |
| Date: | 2012-05-08 19:01:01 |
| Message-ID: | 1336503661.23272.4.camel@vanquo.pezone.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On ons, 2012-01-18 at 14:55 -0500, Tom Lane wrote:
> BTW, it strikes me that maybe the coding should work about like this:
>
> if (!TransactionIdIsValid(age_reference_xid))
> {
> age_reference_xid = GetTopTransactionIdIfAny();
> if (!TransactionIdIsValid(age_reference_xid))
> age_reference_xid = ReadNewTransactionId();
> }
> ... use age_reference_xid to compute result ...
>
> and of course code somewhere to reset age_reference_xid at end of xact.
How about this patch?
| Attachment | Content-Type | Size |
|---|---|---|
| xid-age-hot-standby.patch | text/x-patch | 3.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2012-05-08 21:35:27 | Re: Latch for the WAL writer - further reducing idle wake-ups. |
| Previous Message | Peter Eisentraut | 2012-05-08 18:10:18 | Re: more possible dead ports cleanup |