pgsql: Skip temp tables from basebackup.

Started by Teodor Sigaevover 8 years ago8 messagescomitters
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t208277
psql -h localhost -U postgres

Built from patchset v7 (message #7), July 29, 2026 at 01:04 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t208277_7 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t208277_7 && git checkout t208277_7

Patchset v7 (message #7) is on t208277_7

Jump to latest
#1Teodor Sigaev
teodor@sigaev.ru

Skip temp tables from basebackup.

Do not store temp tables in basebackup, they will not be visible anyway, so,
there are not reasons to store them.

Author: David Steel
Reviewed by: me
Discussion: /messages/by-id/5ea4d26a-a453-c1b7-eff9-5a3ef8f8aceb@pgmasters.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/920a5e500a119b03356fb1fb64a677eb1aa5fc6f

Modified Files
--------------
doc/src/sgml/protocol.sgml | 2 +-
src/backend/replication/basebackup.c | 10 ++++++
src/backend/storage/file/fd.c | 3 +-
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 49 +++++++++++++++++++++++++++-
src/include/storage/fd.h | 1 +
5 files changed, 61 insertions(+), 4 deletions(-)

#2Teodor Sigaev
teodor@sigaev.ru
In reply to: Teodor Sigaev (#1)
Re: pgsql: Skip temp tables from basebackup.

Hm, seems, Windows doesn't like this patch
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2018-03-27

David, could you have a look?

Teodor Sigaev wrote:

Skip temp tables from basebackup.

Do not store temp tables in basebackup, they will not be visible anyway, so,
there are not reasons to store them.

Author: David Steel
Reviewed by: me
Discussion: /messages/by-id/5ea4d26a-a453-c1b7-eff9-5a3ef8f8aceb@pgmasters.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/920a5e500a119b03356fb1fb64a677eb1aa5fc6f

Modified Files
--------------
doc/src/sgml/protocol.sgml | 2 +-
src/backend/replication/basebackup.c | 10 ++++++
src/backend/storage/file/fd.c | 3 +-
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 49 +++++++++++++++++++++++++++-
src/include/storage/fd.h | 1 +
5 files changed, 61 insertions(+), 4 deletions(-)

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

#3Teodor Sigaev
teodor@sigaev.ru
In reply to: Teodor Sigaev (#2)
Re: pgsql: Skip temp tables from basebackup.
#4David Steele
david@pgbackrest.org
In reply to: Teodor Sigaev (#2)
Re: pgsql: Skip temp tables from basebackup.

On 3/27/18 10:17 AM, Teodor Sigaev wrote:

Hm, seems, Windows doesn't like this patch
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2018-03-27

Will do. Probably a path problem, which hopefully I can fix with the new
function Andrew wrote.

--
-David
david@pgmasters.net

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: David Steele (#4)
Re: pgsql: Skip temp tables from basebackup.

David Steele <david@pgmasters.net> writes:

Will do. Probably a path problem, which hopefully I can fix with the new
function Andrew wrote.

Looks to me more like a failure-to-count-the-number-of-tests
problem. There's no test reported as "not ok".

regards, tom lane

#6Andrew Gierth
andrew@tao11.riddles.org.uk
In reply to: Teodor Sigaev (#2)
Re: pgsql: Skip temp tables from basebackup.

"Teodor" == Teodor Sigaev <teodor@sigaev.ru> writes:

Teodor> Hm, seems, Windows doesn't like this patch

You added two tests to the SKIP: block without updating the number of
tests that would be skipped, so the final count of tests comes out
wrong.

skip "symlinks not supported on Windows", 15 if ($windows_os);

above 15 should presumably be 17 (did not test this myself since I don't
have windows)

--
Andrew (irc:RhodiumToad)

#7David Steele
david@pgbackrest.org
In reply to: Teodor Sigaev (#3)
Re: pgsql: Skip temp tables from basebackup.

On 3/27/18 10:24 AM, Teodor Sigaev wrote:

Hm, seems, Windows doesn't like this patch
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&amp;dt=2018-03-27

sorry for wrong URL
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&amp;dt=2018-03-27%2013%3A30%3A24

Looks like the skip total for Windows is incorrect. The attached should
fix it.

Thanks,
--
-David
david@pgmasters.net

Attachments:

t208277_7
backup-temp-test-fix.patchtext/plain; charset=UTF-8; name=backup-temp-test-fix.patch; x-mac-creator=0; x-mac-type=0Download+1-1
#8Teodor Sigaev
teodor@sigaev.ru
In reply to: David Steele (#7)
Re: pgsql: Skip temp tables from basebackup.

Thanks for everyone, pushed. Let us follow the pgbuildfarm

David Steele wrote:

On 3/27/18 10:24 AM, Teodor Sigaev wrote:

Hm, seems, Windows doesn't like this patch
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&amp;dt=2018-03-27

sorry for wrong URL
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&amp;dt=2018-03-27%2013%3A30%3A24

Looks like the skip total for Windows is incorrect. The attached should
fix it.

Thanks,

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/