From: | Leonardo Francalanci <m_lists(at)yahoo(dot)it> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: switch UNLOGGED to LOGGED |
Date: | 2011-05-20 08:37:20 |
Message-ID: | 894613.16862.qm@web29017.mail.ird.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I'll try to sum up what I understood:
1) the standby keeps the lock, so no problem with
stray files coming from the unlogged->logged log
reply, as the table can't be read during the operation
2) calling ResetUnloggedRelations before
ProcArrayApplyRecoveryInfo would remove the problem
of the stray files on the standby in case of master crash
before commit/abort
3) promoting the standby shouldn't be an issue,
since ResetUnloggedRelations is already called in
ShutdownRecoveryTransactionEnvironment
Now, to move forward, some questions:
- the patch is missing the "send all table pages to the
standby" part; is there some code I can use as base?
I guess I have to generate some special log type that
is only "played" by standby servers.
- on the standby, the commit part should be played as it
is on the master (that is, removing the INIT fork).
The abort case is different though: it would mean
doing nothing on the master, while removing every forks
but the INIT fork on the standby.
Would it be ok to add to xl_xact_abort a new array of
RelFileNode(s), where for each one at abort all the forks,
except the init fork, have to be deleted by the standby
(while the master shouldn't do anything with them)?
I bet there's a cleaner solution...
Leonardo
From | Date | Subject | |
---|---|---|---|
Next Message | Leonardo Francalanci | 2011-05-20 08:59:36 | Re: switch UNLOGGED to LOGGED |
Previous Message | Dean Rasheed | 2011-05-20 05:43:39 | Re: 9.1 support for hashing arrays |