Search Postgresql Archives

commit delay with dblink.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux