commit delay with dblink.

From: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Subject: commit delay with dblink.
Date: 2011-01-06 14:31:38
Message-ID: C4DAC901169B624F933534A26ED7DF31034BB9EA@JENMAIL01.ad.intershop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I've a quite severe issue with dblink, whereas asynchronous sent
transaction are not immediately visible for the next operations.
I'm using dblink_send_query to distribute large aggregation on multiple
processors from within stored procedures.

Someting like:

function step1()
$$
...

select cic_multithread(
ARRAY[
'insert into x select...',
'insert into x select...',
'insert into x select...',
'insert into x select...'
]
);
select cic_closethreads();
...
$$

function step(2)
$$
...
select count(*) from x;
...
$$

When I then call step1 and step2 sequentially using different
connections,
step2 does not see the result of all asynchronous transactions called in
step1.

e.g.:

psql -c"select step1()"
psql -c"select step2()"

adding a sleep time between these 2 calls solve the problem.

Is there something wrong with my configuration?
I can't figure an explanation for this....

Postgres: 8.3.13

WAL settings:

#fsync = on # turns forced synchronization on or
off
#synchronous_commit = on # immediate fsync at commit
#wal_sync_method = fsync # the default is the first option
# supported by the operating system:
# open_datasync
# fdatasync
# fsync
# fsync_writethrough
# open_sync
full_page_writes = off # recover from partial page writes
# (off here due to our
battery-buffered controller caches)
wal_buffers = 1MB # min 32kB
# (change requires restart)
#wal_writer_delay = 200ms # 1-10000 milliseconds

#commit_delay = 0 # range 0-100000, in microseconds
#commit_siblings = 5 # range 1-1000

# - Checkpoints -

checkpoint_segments=256
checkpoint_timeout = 15min # range 30s-1h
checkpoint_completion_target = 0.8 # checkpoint target duration, 0.0 -
1.0
#checkpoint_warning = 30s # 0 is off

# - Archiving -

#archive_mode = off # allows archiving to be done
#archive_command = '' # command to use to archive a logfile
segment
#archive_timeout = 0 # force a logfile segment switch after
this

Thanks,

Marc Mamin

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2011-01-06 14:38:14 Re: linux server configuration
Previous Message Scott Ribe 2011-01-06 14:29:48 Re: UUID column as pimrary key?