[Pgpool-general] Does pgpool support NOW() Function?

Longtime longtime at mail2000.com.tw
Tue Jun 23 08:51:48 UTC 2009


Hi~

I understand ..
It is a better way to running the NOW() function at the business logic level

Thanks your help!


※ 引述《"Jaume Sabater" <jsabater at gmail.com>》之郵件內容: 
>On Tue, Jun 16, 2009 at 11:01 AM, Longtime<longtime at mail2000.com.tw> wrote:
>
>> When I inserting the present time data with a NOW( ) function
>> ex:
>> the NOW( ) function is contained in the query,
>> or the default value of a table is being set to 'NOW'
>
>pgpool-II sends the query to both nodes and makes sure that both were
>executed properly. pgpool-II won't alter the SQL query, therefore that
>NOW() function will be executed on each node and the affected datetime
>field will receive that value (e.g. 2009-06-16 22:10:00:00 GMT).
>
>> That values could be replicated?
>
>pgpool-II cannot control that the value returned by the execution of
>the NOW() function is the same on both nodes due to the nature of
>replication at SQL level (not binary level), but it provides a
>mechanism named "insert_lock" to help out with that sort of problems.
>Please see:
>
>http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html
>
>Use your browser search function to find "insert_lock".
>
>Still, from my experience, it's best to get that value at the business
>logic level and use databases as pure storage servers (no login inside
>them).
>
>-- 
>Jaume Sabater
>http://linuxsilo.net/
>
>"Ubi sapientas ibi libertas"
>


More information about the Pgpool-general mailing list