Re: Tablespaces
От | Tom Lane |
---|---|
Тема | Re: Tablespaces |
Дата | |
Msg-id | 26637.1078190557@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Tablespaces ("Simon Riggs" <simon@2ndquadrant.com>) |
Ответы |
Re: Out of space situation and WAL log pre-allocation (was Tablespaces)
|
Список | pgsql-hackers |
"Simon Riggs" <simon@2ndquadrant.com> writes: > Gavin Sherry wrote: >> I do not intend to work on such a system for the initial introduction of >> table spaces. The problem is, of course, knowing when you're actually out >> of space in a table space in any given transaction. Given that WAL is on a >> different partition (at least for the moment) the table space will not >> have transaction X's data written to it until after transaction X is >> finished. And we cannot error out a transaction which is already >> commited. As long as the kernel doesn't lie about file extension, we will not commit any transaction that requires a disallowed increase in the allocated size of data files, because allocation of another table page is checked with the kernel during the transaction. So on most filesystems (maybe not NFS) the problem Gavin is worried about doesn't exist. > You're absolutely right about the not-knowing when you're out of space > issue. However, if the xlog has been written then it is not desirable, > but at least acceptable that the checkpoint/bgwriter cannot complete on > an already committed txn. It's not the txn which is getting the error, > that's all. Right. This is in fact not a fatal situation, as long as you don't run out of preallocated WAL space. For a recent practical example of our behavior under zero-free-space conditions, see this thread: http://archives.postgresql.org/pgsql-hackers/2004-01/msg00530.php particularly the post-mortem here: http://archives.postgresql.org/pgsql-hackers/2004-01/msg00606.php Barring one small bug, the database would likely have stayed up, and continued to service at least the read-only transactions, until Chris got around to freeing some disk space. I think it is sufficient (at least in the near term) to expect people to use partition size limits if they want to control database size --- that is, make a partition of the desired size and put the database directory in there. Tablespaces as per the design we are discussing would make it easier to apply such a policy to a sub-area of a database cluster than it is today, but they needn't in themselves implement the restriction. regards, tom lane
В списке pgsql-hackers по дате отправления: