Too many files in pg_replslot folder

From: Dmitriy Sarafannikov <d(dot)sarafannikov(at)bk(dot)ru>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Too many files in pg_replslot folder
Date: 2016-03-10 14:49:18
Message-ID: 1457621358.355011041@f382.i.mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi, all.

I tried to test logical replication with 'test_decoding' plugin.
I created logical slot and launched pg_recvlogical utility on ~8 hours.
When i tried to drop replication slot via pg_drop_replication_slot, backend ate my disk on 100% and didn't want to release him.
I saw via strace, that he deletes files:

lstat("pg_replslot/test_slot.tmp/xid-2917185562-lsn-4981-AE000000.snap", {st_mode=S_IFREG|0600, st_size=169, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2917185562-lsn-4981-AE000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2915407454-lsn-497F-14000000.snap", {st_mode=S_IFREG|0600, st_size=161, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2915407454-lsn-497F-14000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2915727847-lsn-497F-8C000000.snap", {st_mode=S_IFREG|0600, st_size=169, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2915727847-lsn-497F-8C000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2919565207-lsn-4984-94000000.snap", {st_mode=S_IFREG|0600, st_size=177, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2919565207-lsn-4984-94000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2915738746-lsn-497F-8D000000.snap", {st_mode=S_IFREG|0600, st_size=177, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2915738746-lsn-497F-8D000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2917437588-lsn-4981-F2000000.snap", {st_mode=S_IFREG|0600, st_size=161, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2917437588-lsn-4981-F2000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2917359031-lsn-4981-E5000000.snap", {st_mode=S_IFREG|0600, st_size=161, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2917359031-lsn-4981-E5000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2917766393-lsn-4982-84000000.snap", {st_mode=S_IFREG|0600, st_size=177, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2917766393-lsn-4982-84000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2915337440-lsn-497F-8000000.snap", {st_mode=S_IFREG|0600, st_size=169, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2915337440-lsn-497F-8000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2916494069-lsn-4980-C3000000.snap", {st_mode=S_IFREG|0600, st_size=177, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2916494069-lsn-4980-C3000000.snap") = 0
lstat("pg_replslot/test_slot.tmp/xid-2916877166-lsn-4981-4F000000.snap", {st_mode=S_IFREG|0600, st_size=169, ...}) = 0
unlink("pg_replslot/test_slot.tmp/xid-2916877166-lsn-4981-4F000000.snap") = 0
He seemed to be in infinite loop. 1109428 files were in the slot folder.
It looks like abnormal behavior. Why are so many files?
Maybe i'm doing something wrong? Or maybe it is bug?
How i can avoid this?

And wal sender ate ~800 mb of memory during this test. Is it leakage?

version
-----------------------------------------------------------------------------------------------
PostgreSQL 9.4.6 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit

Thanks for advance and sorry for my English.

Regards,
Dmitriy Sarafannikov

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2016-03-10 15:13:33 Re: BUG #14012: How to change password in postgreSQL?
Previous Message Léonard Benedetti 2016-03-10 14:44:17 Re: BUG #13440: unaccent does not remove all diacritics