Re: partitioning / rules - strange behavior

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: partitioning / rules - strange behavior
Дата
Msg-id a9c525b712bb1c0cf797c8791dc1cd25@biglumber.com
обсуждение исходный текст
Ответ на partitioning / rules - strange behavior  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: partitioning / rules - strange behavior  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> db=> INSERT INTO sessions(... non-pk columns ...) VALUES (... data ...);
> INSERT 0 0
> db=> SELECT * FROM sessions WHERE id = currval('sessions_id_seq');
> (0 rows)
>
> which seems really strange to me. We're using sequence to generate the
> ids, but that shouldn't be a problem (at least it was not till today).

Looks to me as though you have forgottent the table inheritance part of the
table partitioning trick. Are you sure that sessions_900000 inherit from
the sessions table? Does a direct count from the table referenced by the
rule return a non-zero count? In other words:

SELECT count(*) FROM sessions_900000 where id = currval('sessions_id_seq');

(or some other similar table) may show your "missing" rows. The other
possibility is that the you are not using sessions_id_seq in the way
you think you are.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200702041952
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFFxoDWvJuQZxSWSsgRAxqLAKDNedJ2pPg9otabsrinS1002SL0XQCeMwyF
8dqMxeB/x4XoZoj2WATZyPc=
=mvMI
-----END PGP SIGNATURE-----



В списке pgsql-general по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: partitioning / rules - strange behavior
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: partitioning / rules - strange behavior