keeping WAL after dropping replication slots

Started by Tom DalPozzoabout 9 years ago8 messagesgeneral
Jump to latest
#1Tom DalPozzo
t.dalpozzo@gmail.com

Hi,
I had two replication slots on my primary. Slaves off and (around 800) WALs
kept as expected.
I dropped those slots but over time, the system kept on adding new WALs
without reusing them or deleting them.
Only after shutdown and restart the system deleted those WAL files.
Is that ok?
regards
Pupillo

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Tom DalPozzo (#1)
Re: keeping WAL after dropping replication slots

On 04/04/2017 07:45 AM, Tom DalPozzo wrote:

Postgres version?

Hi,
I had two replication slots on my primary. Slaves off and (around 800)
WALs kept as expected.

Slaves off means?:

You replication set up from the master to the slaves(how many?).
Then you disconnected the slaves how?

So the 800 WALs number mean you have wal_keep_segments set to 800?

I dropped those slots but over time, the system kept on adding new WALs
without reusing them or deleting them.
Only after shutdown and restart the system deleted those WAL files.
Is that ok?
regards
Pupillo

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#3Tom DalPozzo
t.dalpozzo@gmail.com
In reply to: Adrian Klaver (#2)
Re: keeping WAL after dropping replication slots

Hi,

2017-04-05 1:55 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com>:

On 04/04/2017 07:45 AM, Tom DalPozzo wrote:

Postgres version?

9.6.1

Hi,

I had two replication slots on my primary. Slaves off and (around 800)
WALs kept as expected.

Slaves off means?:

You replication set up from the master to the slaves(how many?).
Then you disconnected the slaves how?

I have 2 slaves configured with async replication but they were down when

I dropped the slots.

So the 800 WALs number mean you have wal_keep_segments set to 800?

No, wal_keep_segments is commented.
800 is the rough number of files I saw in xlog dir before dropping the
slots.

I dropped those slots but over time, the system kept on adding new WALs

without reusing them or deleting them.
Only after shutdown and restart the system deleted those WAL files.
Is that ok?
regards
Pupillo

--
Adrian Klaver
adrian.klaver@aklaver.com

Regards
Pupillo

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Tom DalPozzo (#3)
Re: keeping WAL after dropping replication slots

On 04/04/2017 11:52 PM, Tom DalPozzo wrote:

Hi,

2017-04-05 1:55 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

On 04/04/2017 07:45 AM, Tom DalPozzo wrote:

Postgres version?

9.6.1

Hi,
I had two replication slots on my primary. Slaves off and
(around 800)
WALs kept as expected.

Slaves off means?:

You replication set up from the master to the slaves(how many?).
Then you disconnected the slaves how?

I have 2 slaves configured with async replication but they were down
when I dropped the slots.

So the 800 WALs number mean you have wal_keep_segments set to 800?

No, wal_keep_segments is commented.
800 is the rough number of files I saw in xlog dir before dropping the
slots.

What are your settings for?:

archive_mode

archive_command

Do you see anything in the Postgres log that might apply?

I dropped those slots but over time, the system kept on adding
new WALs
without reusing them or deleting them.
Only after shutdown and restart the system deleted those WAL files.
Is that ok?
regards
Pupillo

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

Regards
Pupillo

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#5Tom DalPozzo
t.dalpozzo@gmail.com
In reply to: Adrian Klaver (#4)
Re: keeping WAL after dropping replication slots

Hi,
2017-04-06 21:51 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com>:

On 04/04/2017 11:52 PM, Tom DalPozzo wrote:

Hi,

2017-04-05 1:55 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

On 04/04/2017 07:45 AM, Tom DalPozzo wrote:

Postgres version?

9.6.1

Hi,
I had two replication slots on my primary. Slaves off and
(around 800)
WALs kept as expected.

Slaves off means?:

You replication set up from the master to the slaves(how many?).
Then you disconnected the slaves how?

I have 2 slaves configured with async replication but they were down
when I dropped the slots.

So the 800 WALs number mean you have wal_keep_segments set to 800?

No, wal_keep_segments is commented.
800 is the rough number of files I saw in xlog dir before dropping the
slots.

What are your settings for?:

archive_mode

archive_mode is off

archive_command

it's set as I tested it some months ago but now archive_mode is off

Do you see anything in the Postgres log that might apply?

No, nothing

I dropped those slots but over time, the system kept on adding
new WALs
without reusing them or deleting them.
Only after shutdown and restart the system deleted those WAL
files.
Is that ok?
regards
Pupillo

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

Regards
Pupillo

Thanks

Pupillo

#6Chris Mair
chris@1006.org
In reply to: Tom DalPozzo (#5)
Re: keeping WAL after dropping replication slots

Postgres version?

9.6.1

Have you considered upgrading to 9.6.2?
There were some fixes, including WAL related:

https://www.postgresql.org/docs/9.6/static/release-9-6-2.html

Not exactly regarding what you see, though...

Bye,
Chris.

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

#7Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Tom DalPozzo (#5)
Re: keeping WAL after dropping replication slots

On 04/06/2017 11:18 PM, Tom DalPozzo wrote:

Hi,
2017-04-06 21:51 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

On 04/04/2017 11:52 PM, Tom DalPozzo wrote:

Hi,

2017-04-05 1:55 GMT+02:00 Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
<mailto:adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>>:

On 04/04/2017 07:45 AM, Tom DalPozzo wrote:

Postgres version?

9.6.1

Hi,
I had two replication slots on my primary. Slaves off and
(around 800)
WALs kept as expected.

Slaves off means?:

You replication set up from the master to the slaves(how many?).
Then you disconnected the slaves how?

I have 2 slaves configured with async replication but they were down
when I dropped the slots.

So the 800 WALs number mean you have wal_keep_segments set
to 800?

No, wal_keep_segments is commented.
800 is the rough number of files I saw in xlog dir before
dropping the
slots.

What are your settings for?:

archive_mode

archive_mode is off

archive_command

it's set as I tested it some months ago but now archive_mode is off

Do you see anything in the Postgres log that might apply?

No, nothing

I am not sure what is going on.

Are the number of WAL files still growing?

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#8Tom DalPozzo
t.dalpozzo@gmail.com
In reply to: Adrian Klaver (#7)
Re: keeping WAL after dropping replication slots

2017-04-07 15:57 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com>:

On 04/06/2017 11:18 PM, Tom DalPozzo wrote:

Hi,
2017-04-06 21:51 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

On 04/04/2017 11:52 PM, Tom DalPozzo wrote:

Hi,

2017-04-05 1:55 GMT+02:00 Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
<mailto:adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>>:

On 04/04/2017 07:45 AM, Tom DalPozzo wrote:

Postgres version?

9.6.1

Hi,
I had two replication slots on my primary. Slaves off and
(around 800)
WALs kept as expected.

Slaves off means?:

You replication set up from the master to the slaves(how
many?).
Then you disconnected the slaves how?

I have 2 slaves configured with async replication but they were
down
when I dropped the slots.

So the 800 WALs number mean you have wal_keep_segments set
to 800?

No, wal_keep_segments is commented.
800 is the rough number of files I saw in xlog dir before
dropping the
slots.

What are your settings for?:

archive_mode

archive_mode is off

archive_command

it's set as I tested it some months ago but now archive_mode is off

Do you see anything in the Postgres log that might apply?

No, nothing

I am not sure what is going on.

Are the number of WAL files still growing?

No, once I restarted the server, they got deleted. The problem was only
before restarting the server.
Regards
Pupillo

Show quoted text

--
Adrian Klaver
adrian.klaver@aklaver.com