PATCH: Exclude additional directories in pg_basebackup

From: David Steele <david(at)pgmasters(dot)net>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
Subject: PATCH: Exclude additional directories in pg_basebackup
Date: 2016-08-15 19:39:03
Message-ID: ced3b05f-c1d9-c262-ce63-9744ef7e6de8@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Recently a hacker proposed a patch to add pg_dynshmem to the list of
directories whose contents are excluded in pg_basebackup. I wasn't able
to find the original email despite several attempts.

That patch got me thinking about what else could be excluded and after
some investigation I found the following: pg_notify, pg_serial,
pg_snapshots, pg_subtrans. These directories are all cleaned, zeroed,
or rebuilt on server start.

The attached patch adds these directories to the pg_basebackup
exclusions and takes an array-based approach to excluding directories
and files during backup.

I also incorporated Ashutosh's patch to fix corruption when
pg_stat_tmp/pg_replslot are links [1]. This logic has been extended to
all excluded directories.

Perhaps these patches should be merged in the CF but first I'd like to
see if anyone can identify problems with the additional exclusions.

Thanks,
--
-David
david(at)pgmasters(dot)net

[1]
http://www.postgresql.org/message-id/flat/CAE9k0Pm7=x_o0W7E2b2s2cWcZdcBGczGdrxttzXOZGp8bEBcGw(at)mail(dot)gmail(dot)com/

Attachment Content-Type Size
basebackup-exclusions-v1.patch text/plain 7.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-08-15 19:42:18 Re: PATCH: Exclude additional directories in pg_basebackup
Previous Message Tom Lane 2016-08-15 19:32:50 Re: Let's get rid of the separate minor version numbers for shlibs