View Issue Details

IDProjectCategoryView StatusLast Update
0000087Pgpool-IIBugpublic2014-01-23 11:22
Reporteryuri.kurenkovAssigned Tot-ishii 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionopen 
Platformx64-86OSCentOSOS Version6.5
Product Version 
Target VersionFixed in Version 
Summary0000087: "unnamed prepared statement does not exist"
DescriptionAfter upgrade from pgpool-3.3.1 to pgpool-3.3.2 my postgresql.log filled by many error records "unnamed prepared statement does not exist". After downgrading to pgpool-II-3.3.1 this errors was gone. After upgradeing-downgrading pgpool.conf file still the same.
TagsNo tags attached.

Activities

t-ishii

2013-12-10 17:47

developer   ~0000379

Is there any way to reliably reproduce the problem?

yuri.kurenkov

2013-12-10 18:29

reporter   ~0000380

This is two requests, prodused error (from pgpool.log):

2013-12-10 09:34:21 LOG: pid 10450: DB node id: 0 backend pid: 27419 statement
: BEGIN
2013-12-10 09:34:21 LOG: pid 10450: DB node id: 0 backend pid: 27419 statement
: B message
2013-12-10 09:34:21 LOG: pid 10450: pool_send_and_wait: Error or notice messag
e from backend: : DB node id: 0 backend pid: 27419 statement: INSERT INTO tenant
s
        (
        active,
        created_at,
        email,
        secondary_email,
        first_name,
        last_name,
        phone,
        "name",
        "domain",
        legal_address,
        actual_address,
        postal_code,
        user_count,
        updated_at,
        version,
        country_id,
        created_by,
        locale_id,
        reseller_id,
        ownership_type_id,
        updated_by,
        google_id
        )
        VALUES
        (
        $1,
        $2,
        $3,
        $4,
        $5,
        $6,
        $7,
        $8,
        $9,
        $10,
        $11,
        $12,
        $13,
        $14,
        0,
        $15,
        $16,
        $17,
        $18,
        $19,
        $20,
        $21
        ) RETURNING * message: unnamed prepared statement does not exist
2013-12-10 09:34:21 LOG: pid 10450: DB node id: 0 backend pid: 27419 statement: COMMIT

and


2013-12-10 06:40:00 LOG: pid 10459: DB node id: 0 backend pid: 28325 statement: BEGIN
2013-12-10 06:40:00 LOG: pid 10459: DB node id: 0 backend pid: 28325 statement: B message
2013-12-10 06:40:00 LOG: pid 10459: pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 28325 statement: UPDATE ez_subscriptions
        SET
            start_at = $1,
            end_at = $2,
            updated_at = NOW(),
            length = $3,
            periods = $4,
            payment_delay = $5,
            auto_prolong = $6,
            status_id = $7,
            service_id = $8,
            remote_errors_count = $9,
            version = $10 + 1
        WHERE
            id = $11 AND version = $12 message: unnamed prepared statement does not exist
2013-12-10 06:40:00 LOG: pid 10459: DB node id: 0 backend pid: 28325 statement: COMMIT

I can send pgpool.conf if required.

t-ishii

2013-12-14 19:22

developer   ~0000381

I need pgpool.conf and pgpool.log before the error occurs. I expect to exaimin LOCK command issued by pgpool.

yuri.kurenkov

2013-12-17 20:25

reporter  

pgpool.logs.tar.bz2 (21,038 bytes)

yuri.kurenkov

2013-12-17 20:26

reporter   ~0000382

pgpool.log and pgpool.conf in attached pgpool.logs.tar.bz2

topleft

2014-01-20 12:03

reporter   ~0000385

we met this problem too.first,we append 'protocolVersion=2' to our jdbc url and solved;but we think the v2 protocol may be low efficiency,so we back to pgpool-3.3.1 and it works ok.
accroding to our situation ,this error may have some relation to nested transactions.

scrappy

2014-01-23 08:45

reporter   ~0000387

Just to confirm, I'm also seeing this.

FreeBSD 9.x, PostgreSQL 9.3.x, latest JDBC41 driver from jdbc.postgresql.org

pgpool.conf is pretty generic / out of box for -streaming backend ... one master, one slave ... slave is sync (not default async) to master

In case this helps, below is a piece of the postgresql log file related to the error / session:

==
2014-01-22 23:26:43 UTC [24699]: [365-1] db=openstudent,user=openstudent LOG: duration: 0.206 ms parse <unnamed>: select nextval('ost_users_login_history_ID_SEQ')
2014-01-22 23:26:43 UTC [24699]: [366-1] db=openstudent,user=openstudent LOG: duration: 0.090 ms bind <unnamed>: select nextval('ost_users_login_history_ID_SEQ')
2014-01-22 23:26:43 UTC [24699]: [367-1] db=openstudent,user=openstudent LOG: duration: 0.072 ms execute <unnamed>: select nextval('ost_users_login_history_ID_SEQ')
2014-01-22 23:26:43 UTC [24699]: [368-1] db=openstudent,user=openstudent LOG: duration: 0.130 ms parse <unnamed>: INSERT INTO ost_users_login_history (id, activity_date, activity_status, modified_by_user_id, user_id) VALUES ($1, $2, $3, $4, $5)
2014-01-22 23:26:43 UTC [24699]: [369-1] db=openstudent,user=openstudent LOG: duration: 0.038 ms statement: BEGIN
2014-01-22 23:26:43 UTC [24699]: [370-1] db=openstudent,user=openstudent ERROR: unnamed prepared statement does not exist
2014-01-22 23:26:43 UTC [24699]: [371-1] db=openstudent,user=openstudent LOG: duration: 0.028 ms statement: COMMIT
2014-01-22 23:26:43 UTC [24699]: [372-1] db=openstudent,user=openstudent LOG: duration: 0.117 ms parse <unnamed>: UPDATE ost_users_preferences SET value = $1, modified_by_user_id = $2 WHERE (id = $3)
2014-01-22 23:26:43 UTC [24699]: [373-1] db=openstudent,user=openstudent LOG: duration: 0.027 ms statement: BEGIN
2014-01-22 23:26:43 UTC [24699]: [374-1] db=openstudent,user=openstudent ERROR: unnamed prepared statement does not exist
2014-01-22 23:26:43 UTC [24699]: [375-1] db=openstudent,user=openstudent LOG: duration: 0.023 ms statement: COMMIT
2014-01-22 23:26:43 UTC [24699]: [376-1] db=openstudent,user=openstudent LOG: duration: 0.088 ms parse <unnamed>: UPDATE ost_users_preferences SET value = $1, modified_by_user_id = $2 WHERE (id = $3)
2014-01-22 23:26:43 UTC [24699]: [377-1] db=openstudent,user=openstudent LOG: duration: 0.028 ms statement: BEGIN
2014-01-22 23:26:43 UTC [24699]: [378-1] db=openstudent,user=openstudent ERROR: unnamed prepared statement does not exist
2014-01-22 23:26:43 UTC [24699]: [379-1] db=openstudent,user=openstudent LOG: duration: 0.023 ms statement: COMMIT
==

and due to using pgbadger to analyze activity, we have pretty much everything enabled for logging:

==
log_destination = 'stderr' # Valid values are combinations of
log_filename = 'postgresql-%a.log' # log file name pattern,
log_truncate_on_rotation = on # If on, an existing log file with the
log_min_duration_statement = 0 # -1 is disabled, 0 logs all statements
log_checkpoints = on
log_connections = on
log_disconnections = on
log_hostname = on
log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u ' # special values:
log_lock_waits = on # log lock waits >= deadlock_timeout
log_temp_files = 0 # log temporary files equal or larger
log_timezone = 'UTC'
==

I downgraded, like topleft, to 3.3.1, and the problem disappears ...

t-ishii

2014-01-23 09:06

developer   ~0000388

We recently found a problem with 3.3.2 in this regard. The fix was already committed. The patch is here:
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=blobdiff;f=pool_proto_modules.c;h=860c5d16f9898c4d090f8cc036efe9490eb20641;hp=c929c2e0ba094c5b01fcec6ac34e261cf48c926c;hb=35437fa5eada74e181a7940b4917ea6560a75ade;hpb=4ba862a8e8ad2b6723ce09f827bf0f4cf57d7aee
This will appear in 3.3.3. In the meatime, if you hurry, you can apply the patch or you could download 3.3-stable source from here:
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=snapshot;h=35437fa5eada74e181a7940b4917ea6560a75ade;sf=tgz

Issue History

Date Modified Username Field Change
2013-12-10 16:05 yuri.kurenkov New Issue
2013-12-10 17:47 t-ishii Note Added: 0000379
2013-12-10 17:47 t-ishii Assigned To => t-ishii
2013-12-10 17:47 t-ishii Status new => feedback
2013-12-10 18:29 yuri.kurenkov Note Added: 0000380
2013-12-10 18:29 yuri.kurenkov Status feedback => assigned
2013-12-14 19:22 t-ishii Note Added: 0000381
2013-12-17 20:25 yuri.kurenkov File Added: pgpool.logs.tar.bz2
2013-12-17 20:26 yuri.kurenkov Note Added: 0000382
2014-01-20 12:03 topleft Note Added: 0000385
2014-01-23 08:45 scrappy Note Added: 0000387
2014-01-23 09:06 t-ishii Note Added: 0000388
2014-01-23 11:22 t-ishii Status assigned => resolved