![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
L.S. Since I started to use v8.1 I've been seeing incidental segfaults of the autovacuum process, probably when it is kicking in at some particular point during the pg_restore of a database: |
#3
| |||
| |||
|
|
Since I started to use v8.1 I've been seeing incidental segfaults of the autovacuum process, probably when it is kicking in at some particular point during the pg_restore of a database: |
#4
| |||
| |||
|
|
Frank van Vugt wrote: Since I started to use v8.1 I've been seeing incidental segfaults of the autovacuum process, probably when it is kicking in at some particular point during the pg_restore of a database: |
|
The attached patch should correct the problem, but I'd like to make sure it does ... |
#5
| |||
| |||
|
|
The attached patch should correct the problem, but I'd like to make sure it does ... |
#6
| |||
| |||
|
|
Alvaro Herrera <alvherre (AT) commandprompt (DOT) com> writes: The attached patch should correct the problem, but I'd like to make sure it does ... Rather than that, I'd suggest just setting ActiveSnapshot unconditionally after each of the StartTransactionCommand calls in autovacuum.c, ie make the code look just like vacuum.c: /* Begin a transaction for vacuuming this relation */ StartTransactionCommand(); /* functions in indexes may want a snapshot set */ ActiveSnapshot = CopySnapshot(GetTransactionSnapshot()); This seems more future-proof. The patch as proposed is assuming a whole lot about where snapshots might or might not get used. |
#7
| |||
| |||
|
|
Tom, is your patch meant for the exact same location? |
#8
| |||
| |||
|
|
Alvaro Herrera <alvherre (AT) commandprompt (DOT) com> writes: The attached patch should correct the problem, but I'd like to make sure it does ... Rather than that, I'd suggest just setting ActiveSnapshot unconditionally after each of the StartTransactionCommand calls in autovacuum.c, ie make the code look just like vacuum.c: /* Begin a transaction for vacuuming this relation */ StartTransactionCommand(); /* functions in indexes may want a snapshot set */ ActiveSnapshot = CopySnapshot(GetTransactionSnapshot()); |
#9
| |||
| |||
|
|
Hum, I'm unable to reproduce the problem here; could you give me the code for the functions in the functional indexes for tables 164956 or 227469? They must be non-trivial SQL functions AFAICT (I'm rather unable to figure out their shape based only on the backtrace.) |
, but the relid in frame 13 of the latest
#10
| |||
| |||
|
|
No. There are two StartTransactionCommand calls in autovacuum.c, and what I'm suggesting is to add the ActiveSnapshot assignment after each one. |
|
Done. |
![]() |
| Thread Tools | |
| Display Modes | |
| |