On Mon, Sep 1, 2014 at 7:14 AM, Fujii Masao <masao.fu...@gmail.com> wrote: >> I think there is one downside as well for this proposal that >> apart from data loss, it can lead to uncommitted data occupying >> space in database which needs to be later cleaned by vacuum. >> This can happen with non-immediate promote as well, but the >> chances with immediate are more. So the gain we got by doing >> immediate promotion can lead to slow down of operations in some >> cases. It might be useful if we mention this in docs. > > Yep, the immediate promotion might be more likely to cause > the recovery to end before replaying WAL data of VACUUM. But, OTOH, > I think that the immediate promotion might be more likely to cause > the recovery to end before replaying WAL data which will generate > garbage data. So I'm not sure if it's worth adding that note to the doc.
-1 for documenting that. This is mostly a general PostgreSQL phenomenon and has little to do with immediate promotion specifically. I think anything we write here is likely to be more confusing than helpful. > Agreed. So I'm thinking to change the code as follows. > > if (immediate_promote) > ereport(LOG, (errmsg("received immediate promote request"))); > else > ereport(LOG, (errmsg("received promote request"))); +1 for that version. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers