Re: [HACKERS] Re: Idea: recycle WAL segments, don't delete/recreate'em
* Bruce Momjian [EMAIL PROTECTED] wrote: | Most Unix filesystems will not allocate disk blocks until you write in | them. If you just seek out past end-of-file, the file pointer is moved | but the blocks are unallocated. This is how 'ls' can show a 1gb file | that only uses 4k of disk space. Does this imply that we could get a performance gain by preallocating space for indexes and data itself as well ? I've seen that other database products have a setup step where you have to specify the size of the database. Or does PostgreSQL do any other tricks to prevent fragmentation of data ? If we stored all our tables in one file that would be needed. Since we use the OS to do the defragmenting, I don't think it is an issue. We do allocate in 8k chunks to allow the OS to allocate full filesystem blocks already. Not sure if preallocating even more would help. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] Re: Idea: recycle WAL segments, don't delete/recreate'em
Could you explain how postgresql can fall victim the filesystem hole mechanism? Just hoping to force actual storage allocation, or hoping to discourage fragmentation? Most Unix filesystems will not allocate disk blocks until you write in them. If you just seek out past end-of-file, the file pointer is moved but the blocks are unallocated. This is how 'ls' can show a 1gb file that only uses 4k of disk space. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [HACKERS] Re: Idea: recycle WAL segments, don't delete/recreate'em
Checking application/pgp-signature: FAILURE -- Start of PGP signed section. Hi - pgman wrote: : Most Unix filesystems will not allocate disk blocks until you write in : them. [...] Yes, I understand that, but how is it a problem for postgresql? Uh, I thought we did that so we were not allocating file system blocks during WAL writes. Performance is bad when we do that. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl