Skip site navigation (1) Skip section navigation (2)

initdb -S and tablespaces

From: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: initdb -S and tablespaces
Date: 2014-09-29 08:39:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

I just noticed that initdb -S ("Safely write all database files to disk
and exit") does (only) the following in perform_fsync:

    pre_sync_fname(pdir, true);
    walkdir(pg_data, pre_sync_fname);

    fsync_fname(pdir, true);
    walkdir(pg_data, fsync_fname);

walkdir() reads the directory and calls itself recursively for S_ISDIR
entries, or calls the function for S_ISREG entries… which means it
doesn't follow links.

Which means it doesn't fsync the contents of tablespaces.

-- Abhijit


pgsql-hackers by date

Next:From: Kouhei KaigaiDate: 2014-09-29 08:48:27
Subject: Re: [v9.5] Custom Plan API
Previous:From: Andres FreundDate: 2014-09-29 08:15:39
Subject: Re: Replication identifiers, take 3

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group