I'm rewriting the patch so don't worry :-) Thanks,
Gavin On Mon, 21 Jun 2004, Mark Kirkwood wrote: > I don't know if this provides any more info than you already have - > but is my last few lines from a single process backend run with valgrind : > > ==19666== Syscall param write(buf) contains uninitialised or > unaddressable byte(s) > ==19666== at 0x404D94F8: __GI___libc_write (in /lib/libc-2.3.2.so) > ==19666== by 0x80934F8: XLogFlush (xlog.c:1414) > ==19666== by 0x8090723: RecordTransactionCommit (xact.c:550) > ==19666== by 0x8090BC0: CommitTransaction (xact.c:931) > ==19666== Address 0x4219236A is not stack'd, malloc'd or free'd > backend> 1: oid (typeid = 26, len = 4, typmod = -1, byval = t) > 2: nspname (typeid = 19, len = 64, typmod = -1, byval = f) > 3: relname (typeid = 19, len = 64, typmod = -1, byval = f) > ---- > ==19666== > ==19666== Invalid write of size 4 > ==19666== at 0x8109B00: DLMoveToFront (dllist.c:237) > ==19666== by 0x81B2EB5: SearchCatCache (catcache.c:1155) > ==19666== by 0x81B7D72: GetSysCacheOid (syscache.c:606) > ==19666== by 0x81B8C7A: get_relname_relid (lsyscache.c:879) > ==19666== Address 0xCC3D5C04 is not stack'd, malloc'd or free'd > Segmentation fault > > > Gavin Sherry wrote: > > >On Sun, 20 Jun 2004, Tatsuo Ishii wrote: > > > > > > > >>>>Attached is a patch implementing this functionality. > >>>> > >>>>I've modified make_new_heap() as well as swap_relfilenodes() to not assume > >>>>that tablespaces remain the same from old to new heap. I thought it better > >>>>to go down this road than introduce a lot of duplicate code. > >>>> > >>>> > >>>I have tried your patches and it works great. Thanks. > >>> > >>>One thing I noticed was if I change tablespace for a table having > >>>indexes, they are left in the old tablespace and the table itself was > >>>moved to the new tablespace. I regard this is a good thing since I > >>>could assign different table spaces for table and indexes. > >>>It would be even better to assign different tablespaces for each > >>>index. > >>> > >>> > >>Hm. It seems there's a problem with tablespaces. What I did was: > >> > >>pgbench -i test > >>alter table accounts set tablespace mydb2; > >>\d accounts > >> > >>backend crashes by signal 11... > >> > >> > > > > > > > > > !DSPAM:40d66cf4282571539216297! > > ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend