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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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.



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


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