Brian Hirt <[EMAIL PROTECTED]> writes: > I was just writing to let you know I created an easily reproducible > test case too, but I guess you don't need that now.
Does your test case agree with my description of the problem? (If you're not sure, crank up log_min_messages and watch the log to see what autovacuum does before it crashes.) The problem I'm seeing seems to be that vacuum() exits with a transaction started but no snapshot set (StartTransactionCommand will leave ActiveSnapshot set to NULL), if it's in use_own_xacts mode. autovac thinks it only has to set the snapshot once, but that's really not the case given this behavior. I'm unsure whether to fix this by adding a CopySnapshot operation right in vacuum(), or in autovacuum.c. The former is probably cleaner but it clutters vacuum.c with something only autovac really needs. Any opinions? > Also, if a patch is produced, I'd love to get a copy of it. We just > upgraded our production servers to 8.1.1 this morning (this issue > never came up during testing) and I'l like to get this in there > because it's likely to happen again. Definitely a big risk of that :-(. It'll be a one-liner patch in any case, we just have to decide where ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match