X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5C1028B9EBE for ; Fri, 18 Feb 2005 05:48:23 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77961-06 for ; Fri, 18 Feb 2005 05:48:12 +0000 (GMT) Received: from unisoft.unisoftbg.com (unisoft.unisoftbg.com [194.12.229.193]) by svr1.postgresql.org (Postfix) with SMTP id 2026B8B9E82 for ; Fri, 18 Feb 2005 05:48:10 +0000 (GMT) Received: (qmail 41842 invoked by uid 1011); 18 Feb 2005 05:51:37 -0000 Received: from pginfo@t1.unisoftbg.com by unisoft.unisoftbg.com by uid 1009 with qmail-scanner-1.22-st-qms (clamdscan: 0.75. spamassassin: 2.60. Clear:RC:0(192.168.1.201):SA:0(-4.7/5.0):. Processed in 15.965867 secs); 18 Feb 2005 05:51:37 -0000 X-Antivirus-MYDOMAIN-Mail-From: pginfo@t1.unisoftbg.com via unisoft.unisoftbg.com X-Antivirus-MYDOMAIN: 1.22-st-qms (Clear:RC:0(192.168.1.201):SA:0(-4.7/5.0):. Processed in 15.965867 secs Process 41833) Received: from unknown (HELO t1.unisoftbg.com) (pginfo@t1.unisoftbg.com@192.168.1.201) by unisoft.unisoftbg.com with SMTP; 18 Feb 2005 05:51:20 -0000 Message-ID: <421574D8.9090000@t1.unisoftbg.com> Date: Fri, 18 Feb 2005 05:53:44 +0100 From: pginfo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Richard_D_Levine@raytheon.com, Michael Glaesemann , pgsql-sql@postgresql.org, pgsql-sql-owner@postgresql.org Subject: Re: pg primary key bug? References: <4214B466.20908@t1.unisoftbg.com> <8125.1108661189@sss.pgh.pa.us> <4214C94F.2050806@t1.unisoftbg.com> <9340.1108664352@sss.pgh.pa.us> <4214D5C3.4070107@t1.unisoftbg.com> <9785.1108666900@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------030500040203090404000101" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.305 tagged_above=0 required=5 tests=AWL, HTML_20_30, HTML_MESSAGE, HTML_TITLE_EMPTY, RCVD_IN_XBL X-Spam-Level: ** X-Archive-Number: 200502/203 X-Sequence-Number: 20314 --------------030500040203090404000101 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Tom Lane wrote: >pginfo writes: > > >>Will upgrade to 8.0 solve this type of problems ? >> >> > >The problem is probably not Postgres' fault at all. I'm wondering about >disks with write cacheing enabled. And you didn't turn off fsync, >I trust? > > About fsync (part from postgresql.conf) : #--------------------------------------------------------------------------- # WRITE AHEAD LOG #--------------------------------------------------------------------------- # - Settings - #fsync = true # turns forced synchronization on or off #wal_sync_method = fsync # the default varies across platforms: # fsync, fdatasync, open_sync, or open_datasync #wal_buffers = 8 # min 4, 8KB each # - Checkpoints - #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each #checkpoint_timeout = 300 # range 30-3600, in seconds #checkpoint_warning = 30 # 0 is off, in seconds Also part from pg logfile: LOG: statistics collector process (PID 2716) exited with exit code 1 LOG: shutting down LOG: database system is shut down LOG: could not create IPv6 socket: Address family not supported by protocol LOG: database system was shut down at 2005-02-11 19:58:26 EET LOG: checkpoint record is at 2/BAC39188 LOG: redo record is at 2/BAC39188; undo record is at 0/0; shutdown TRUE LOG: next transaction ID: 2221145; next OID: 826607 LOG: database system is ready LOG: recycled transaction log file "00000002000000BA" LOG: recycled transaction log file "00000002000000BB" LOG: recycled transaction log file "00000002000000BC" LOG: recycled transaction log file "00000002000000BD" LOG: recycled transaction log file "00000002000000BE" WARNING: index "a_constants_str_pkey" contains 1449 row versions, but table contains 1422 row versions HINT: Rebuild the index with REINDEX. ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" ERROR: duplicate key violates unique constraint "a_constants_str_pkey" LOG: received smart shutdown request FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command FATAL: terminating connection due to administrator command LOG: statistics collector process (PID 2713) exited with exit code 1 LOG: shutting down LOG: database system is shut down LOG: could not create IPv6 socket: Address family not supported by protocol LOG: database system was shut down at 2005-02-16 08:32:21 EET LOG: checkpoint record is at 2/BFAE09EC LOG: redo record is at 2/BFAE09EC; undo record is at 0/0; shutdown TRUE Note we was informed about the problem on 2005-02-16 and rebooted the box. As I see in log file the last restart was on 2005-02-11 and after it all worked well. The affected table is critical and the most used table in this system and if the insert stop to work stop also the system. I will notice also that in the first case when we found the same problem an this system worked ~80 users. Is it possible pg_dump or reindex table or vacuum analyze to make this problem? We are using it very regular. Will we need to stop using vacuum full at all? regards, ivan. > regards, tom lane > >---------------------------(end of broadcast)--------------------------- >TIP 8: explain analyze is your friend > > > > --------------030500040203090404000101 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi,

Tom Lane wrote:
pginfo <pginfo@t1.unisoftbg.com> writes:
  
Will upgrade to 8.0 solve this type of problems ?
    

The problem is probably not Postgres' fault at all.  I'm wondering about
disks with write cacheing enabled.  And you didn't turn off fsync,
I trust?
  
About fsync (part from postgresql.conf) :


#---------------------------------------------------------------------------
# WRITE AHEAD LOG
#---------------------------------------------------------------------------

# - Settings -

#fsync = true                   # turns forced synchronization on or off
#wal_sync_method = fsync        # the default varies across platforms:
                                # fsync, fdatasync, open_sync, or open_datasync
#wal_buffers = 8                # min 4, 8KB each

# - Checkpoints -

#checkpoint_segments = 3        # in logfile segments, min 1, 16MB each
#checkpoint_timeout = 300       # range 30-3600, in seconds
#checkpoint_warning = 30        # 0 is off, in seconds


Also part from pg logfile:

LOG:  statistics collector process (PID 2716) exited with exit code 1
LOG:  shutting down
LOG:  database system is shut down
LOG:  could not create IPv6 socket: Address family not supported by protocol
LOG:  database system was shut down at 2005-02-11 19:58:26 EET
LOG:  checkpoint record is at 2/BAC39188
LOG:  redo record is at 2/BAC39188; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 2221145; next OID: 826607
LOG:  database system is ready
LOG:  recycled transaction log file "00000002000000BA"
LOG:  recycled transaction log file "00000002000000BB"
LOG:  recycled transaction log file "00000002000000BC"
LOG:  recycled transaction log file "00000002000000BD"
LOG:  recycled transaction log file "00000002000000BE"
WARNING:  index "a_constants_str_pkey" contains 1449 row versions, but table contains 1422 row versions
HINT:  Rebuild the index with REINDEX.
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
ERROR:  duplicate key violates unique constraint "a_constants_str_pkey"
LOG:  received smart shutdown request
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
LOG:  statistics collector process (PID 2713) exited with exit code 1
LOG:  shutting down
LOG:  database system is shut down
LOG:  could not create IPv6 socket: Address family not supported by protocol
LOG:  database system was shut down at 2005-02-16 08:32:21 EET
LOG:  checkpoint record is at 2/BFAE09EC
LOG:  redo record is at 2/BFAE09EC; undo record is at 0/0; shutdown TRUE


Note we was informed about the problem on  2005-02-16 and rebooted the box.
As I see in log file the last restart was on 2005-02-11 and after it all worked well.
The affected table is critical  and the most used table in this system and if the insert stop to work stop also the system.
I will notice also that in the first case when we found the same problem an this system worked ~80 users.

Is it possible pg_dump or reindex table or vacuum analyze to make this problem?
We are using it very regular.

Will we need to stop using vacuum full at all?

regards,
ivan.


			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


  

--------------030500040203090404000101--