pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andre Lopes <lopes80andre@gmail.com>
To: pgsql-php@postgresql.org
Subject: pcntl_fork() and database concurrency
Date: Fri, 23 Apr 2010 10:09:57 +0100
Message-ID: <x2h18f98e681004230209z78a290f0t6019bdc43a644c23@mail.gmail.com> (raw)

Hi,

I need to write a PHP Script to use with a Crontab. That Crontab will run
every 10 minutes.

I should use pcntl_fork() to prevent concurrency in database queries, but I
don't have sure how to use this PHP function.

The reason for use this function is to prevent that if the Crontab don't do
the Job in 10 minutes, the next Cronjob will not concur with the job in the
background that is running.

My question. There are PostgreSQL examples on how to use this function to
prevent database concurrency?

Best Regards,

view thread (4+ messages)  latest in thread

Message-ID: <x2h18f98e681004230209z78a290f0t6019bdc43a644c23@mail.gmail.com>
Permalink:  ../x2h18f98e681004230209z78a290f0t6019bdc43a644c23@mail.gmail.com/
Also on:    postgresql.org/message-id/x2h18f98e681004230209z78a290f0t6019bdc43a644c23@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: lopes80andre@gmail.com
  Subject: Re: pcntl_fork() and database concurrency
  In-Reply-To: <x2h18f98e681004230209z78a290f0t6019bdc43a644c23@mail.gmail.com>
  References: <x2h18f98e681004230209z78a290f0t6019bdc43a644c23@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox