Re: wal archiving on a hot-standby server - Mailing list pgsql-general

From John R Pierce
Subject Re: wal archiving on a hot-standby server
Date
Msg-id 4ECB73AF.9070105@hogranch.com
Whole thread Raw
In response to Re: wal archiving on a hot-standby server  (Enrico Sirola <enrico.sirola@gmail.com>)
Responses Re: wal archiving on a hot-standby server  (Enrico Sirola <enrico.sirola@gmail.com>)
List pgsql-general
On 11/22/11 1:51 AM, Enrico Sirola wrote:
> create or replace function current_xlog_bytes()
> returns int8
> as
> $$
>     select cast(cast( 'x' || lpad(split_part(
>                                   pg_current_xlog_location(), '/', 1),
>                                   8, '0')
>                      as bit(32))
>                 as int8) * 16*1024*1024*254 +
>            cast(cast( 'x' || lpad(split_part(
>                                   pg_current_xlog_location(), '/', 2),
>                                   8, '0')
>                      as bit(32))
>                 as int8)
> $$
> language sql immutable strict;
>
> Any comment?

I don't believe that function is immutable, since it depends on the
value of pg_current_xlog_location() which will change over time.



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


pgsql-general by date:

Previous
From: enrico.sirola@gmail.com
Date:
Subject: Re: wal archiving on a hot-standby server
Next
From: Enrico Sirola
Date:
Subject: Re: wal archiving on a hot-standby server