Search Postgresql Archives

Re: wal archiving on a hot-standby server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux