Re: wal archiving on a hot-standby server

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: wal archiving on a hot-standby server
Date: 2011-11-22 10:04:31
Message-ID: 4ECB73AF.9070105@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message enrico.sirola 2011-11-22 10:05:12 Re: wal archiving on a hot-standby server
Previous Message Enrico Sirola 2011-11-22 09:51:16 Re: wal archiving on a hot-standby server