pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pginfo <pginfo@t1.unisoftbg.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard_D_Levine@raytheon.com, Michael Glaesemann <grzm@myrealbox.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: pg primary key bug?
Date: Tue, 22 Feb 2005 18:20:00 +0100
Message-ID: <421B69C0.1070404@t1.unisoftbg.com> (raw)
References: <OFEF67063C.F61988F3-ON05256F9D.005A91D6@ftw.us.ray.com>
	<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>
	<421992FE.3030108@t1.unisoftbg.com>
	<3293.1109026294@sss.pgh.pa.us>
	<421AC251.7060806@t1.unisoftbg.com>
	<7012.1109061770@sss.pgh.pa.us>
	<421AFC7F.406@t1.unisoftbg.com>
	<10243.1109090250@sss.pgh.pa.us>
	<421B6113.4080706@t1.unisoftbg.com>
	<10956.1109095448@sss.pgh.pa.us>



Tom Lane wrote:

>pginfo <pginfo@t1.unisoftbg.com> writes:
>  
>
>>I will to ask if it will be possible to start some querys (I do not know 
>>the query) exactly before running vacuum full and to save the results in 
>>some log file. If it is possible, we will be able to post the results to 
>>the list in case of  ne problem and to have some start point for 
>>reproducing the problem.
>>    
>>
>
>Well, you should definitely turn on log_statement across the whole
>installation so that you have a complete record of all SQL commands
>being issued.  Make sure the log includes timestamps and PIDs.
>
>I would suggest adding a simple probe for duplicate records to the
>vacuum script.  Maybe something like
>
>	set enable_indexscan to off;
>	select constname,fid,count(*) from a_constants_str
>	group by constname,fid having count(*) > 1;
>
>(The indexscan off bit is just paranoia --- I think that an indexscan
>might mask the presence of multiple copies of what's supposedly a unique
>key.)  Do this just before and just after the vacuum full command.  That
>will at least nail down whether vacuum full is creating the dups, and
>once we see it happen the trace of the day's SQL commands may give some
>ideas where to look.
>  
>
Ok, it was my idea.
We will do it and install the script in ~100 servers and will see the 
result.

>			regards, tom lane
>
>
>  
>
regards,
ivan.

view thread (27+ messages)  latest in thread

Message-ID: <421B69C0.1070404@t1.unisoftbg.com>
Permalink:  ../421B69C0.1070404@t1.unisoftbg.com/
Also on:    postgresql.org/message-id/421B69C0.1070404@t1.unisoftbg.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pginfo@t1.unisoftbg.com, tgl@sss.pgh.pa.us, grzm@myrealbox.com
  Subject: Re: pg primary key bug?
  In-Reply-To: <421B69C0.1070404@t1.unisoftbg.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