On Mon, Aug 20, 2012 at 6:59 PM, Scott Marlowe wrote:
> On Mon, Aug 20, 2012 at 6:10 PM, Tom Lane wrote:
>> Craig James writes:
>>> I want to do this:
>>
>>> select setval('object_id_seq', nextval('object_id_seq') + 1000, false);
>>
>>> Now suppose two processes do this simultaneously. Mayb
On Mon, Aug 20, 2012 at 6:10 PM, Tom Lane wrote:
> Craig James writes:
>> I want to do this:
>
>> select setval('object_id_seq', nextval('object_id_seq') + 1000, false);
>
>> Now suppose two processes do this simultaneously. Maybe they're in
>> transactions, maybe they're not. Are they guar
Craig James writes:
> I want to do this:
> select setval('object_id_seq', nextval('object_id_seq') + 1000, false);
> Now suppose two processes do this simultaneously. Maybe they're in
> transactions, maybe they're not. Are they guaranteed to get distinct
> blocks of IDs?
No, because the s
Is seq.setval() "non transactional" in the same sense as seq.nextval()
is? More specifically, suppose I sometimes want to get IDs one-by-one
using nextval(), but sometimes I want a block of a thousand IDs. To
get the latter, I want to do this:
select setval('object_id_seq', nextval('object_i
Jeff Janes wrote
>
> Maybe there is an easier way, but one thing would be to compile a test
> server (of the same version as the production) with WAL_DEBUG defined
> in src/include/pg_config_manual.h, turn on the wal_debug guc, and
> crank up trace_recovery_messages. Then replay the WAL log file
> It isn't ... or at least, you've offered no evidence that it is.
Sorry, I thought Christophe had sent you the details offlist. Checking ...
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make ch
Josh Berkus writes:
> I guess what I'm really not understanding is why it's calculating a cost
> of 3.7m for the index scan, and then discarding that *entire* cost and
> not including it in the total cost of the query?
It isn't ... or at least, you've offered no evidence that it is.
It's discount