Re: Remove one TimestampTzGetDatum call in pg_stat_get_io() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove one TimestampTzGetDatum call in pg_stat_get_io()
Date
Msg-id 2250103.1725637256@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove one TimestampTzGetDatum call in pg_stat_get_io()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Remove one TimestampTzGetDatum call in pg_stat_get_io()
List pgsql-hackers
I wrote:
> Hmm, TimestampTzGetDatum is not a no-op on 32-bit machines.  If you're
> correct about this, why are our 32-bit BF animals not crashing?  Are
> we failing to test this code?

Oh, I had the polarity backwards: this error doesn't result in trying
to dereference something that's not a pointer, but rather in
constructing an extra indirection layer, with the end result being
that the timestamp displayed in the pg_stat_io view is garbage
(I saw output like "1999-12-31 19:11:45.880208-05" while testing in
a 32-bit VM).  It's not so surprising that our regression tests are
insensitive to the values being displayed there.

I confirm that this fixes the problem.  Will push shortly.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Remove one TimestampTzGetDatum call in pg_stat_get_io()
Next
From: Bertrand Drouvot
Date:
Subject: Re: Remove one TimestampTzGetDatum call in pg_stat_get_io()