Re: [GENERAL] pg_xlog keeps growing

2017-02-27 Thread David G. Johnston
On Monday, February 27, 2017, dhanuj hippie  wrote:

> So does it work like - it can go upto 16MB*1024 times which is 16GB, and
> then this will be cleaned up automatically ?
>
> On Tue, Feb 28, 2017 at 9:47 AM, dhanuj hippie  > wrote:
>
>> psql (9.3.5)
>> wal_keep_segments = 1024
>>
>>
https://www.postgresql.org/docs/9.3/static/wal-configuration.html

David J.


Re: [GENERAL] pg_xlog keeps growing

2017-02-27 Thread dhanuj hippie
Based on my config, what is the max size this directory is expected to grow
? And how can I check whether this recycle/removal is happening fine ?

On Tue, Feb 28, 2017 at 10:08 AM, Michael Paquier  wrote:

> On Tue, Feb 28, 2017 at 1:20 PM, dhanuj hippie 
> wrote:
> > So does it work like - it can go upto 16MB*1024 times which is 16GB, and
> > then this will be cleaned up automatically ?
>
> On a standby each time a restart point is created the oldest segments
> are either recycled or removed, wal_keep_segments retains more of
> that. You can look at KeepLogSeg() in
> src/backend/access/transam/xlog.c if you want..
> --
> Michael
>


Re: [GENERAL] pg_xlog keeps growing

2017-02-27 Thread Michael Paquier
On Tue, Feb 28, 2017 at 1:20 PM, dhanuj hippie  wrote:
> So does it work like - it can go upto 16MB*1024 times which is 16GB, and
> then this will be cleaned up automatically ?

On a standby each time a restart point is created the oldest segments
are either recycled or removed, wal_keep_segments retains more of
that. You can look at KeepLogSeg() in
src/backend/access/transam/xlog.c if you want..
-- 
Michael


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


Re: [GENERAL] pg_xlog keeps growing

2017-02-27 Thread dhanuj hippie
So does it work like - it can go upto 16MB*1024 times which is 16GB, and
then this will be cleaned up automatically ?

On Tue, Feb 28, 2017 at 9:47 AM, dhanuj hippie 
wrote:

> psql (9.3.5)
> wal_keep_segments = 1024
>
> On Tue, Feb 28, 2017 at 9:16 AM, Rob Sargent 
> wrote:
>
>>
>> > On Feb 27, 2017, at 8:33 PM, dhanuj hippie 
>> wrote:
>> >
>> > Hi,
>> >
>> > I have a postgres cluster running in hot_standby. I see the pg_xlog is
>> growing over time (may files of size 16 MB each). The replication lag is
>> very less ~2kB, and never goes into a bad state.
>> > I'm manually resetting this once a while using pg_resetxlog command.
>> > Is there a way to understand why my system keeps running into this
>> problem ?
>> >
>> > Thanks
>>
>> wal_keep_segments is set to ???
>>
>> (and version = ???, etc)
>
>
>


Re: [GENERAL] pg_xlog keeps growing

2017-02-27 Thread dhanuj hippie
psql (9.3.5)
wal_keep_segments = 1024

On Tue, Feb 28, 2017 at 9:16 AM, Rob Sargent  wrote:

>
> > On Feb 27, 2017, at 8:33 PM, dhanuj hippie 
> wrote:
> >
> > Hi,
> >
> > I have a postgres cluster running in hot_standby. I see the pg_xlog is
> growing over time (may files of size 16 MB each). The replication lag is
> very less ~2kB, and never goes into a bad state.
> > I'm manually resetting this once a while using pg_resetxlog command.
> > Is there a way to understand why my system keeps running into this
> problem ?
> >
> > Thanks
>
> wal_keep_segments is set to ???
>
> (and version = ???, etc)


Re: [GENERAL] pg_xlog keeps growing

2017-02-27 Thread Rob Sargent

> On Feb 27, 2017, at 8:33 PM, dhanuj hippie  wrote:
> 
> Hi,
> 
> I have a postgres cluster running in hot_standby. I see the pg_xlog is 
> growing over time (may files of size 16 MB each). The replication lag is very 
> less ~2kB, and never goes into a bad state.
> I'm manually resetting this once a while using pg_resetxlog command.
> Is there a way to understand why my system keeps running into this problem ?
> 
> Thanks

wal_keep_segments is set to ???

(and version = ???, etc)

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


[GENERAL] pg_xlog keeps growing

2017-02-27 Thread dhanuj hippie
Hi,

I have a postgres cluster running in hot_standby. I see the pg_xlog is
growing over time (may files of size 16 MB each). The replication lag is
very less ~2kB, and never goes into a bad state.
I'm manually resetting this once a while using pg_resetxlog command.
Is there a way to understand why my system keeps running into this problem ?

Thanks