pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRace condition in 7.1.2?
3+ messages / 2 participants
[nested] [flat]
* Race condition in 7.1.2?
@ 2001-10-03 11:22 Steve Frampton <frampton@LinuxNinja.com>
2001-10-03 11:41 ` Re: Race condition in 7.1.2? Steve Frampton <frampton@LinuxNinja.com>
0 siblings, 1 reply; 3+ messages in thread
From: Steve Frampton @ 2001-10-03 11:22 UTC (permalink / raw)
To: pgsql-admin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello:
I've been writing a billing system with C++, ODBC, and PostgreSQL 7.1.2.
After I optimized my queries, I was surprised at how fast PostgreSQL can
swoop through 200,000 billing records. But I noticed, sometimes, the
final stage of my processing never completes, and PostgreSQL is spiralling
the CPU at almost 100%. I have to kill the process, which is thankfully
detected by my application which does a rollback.
Anyway, I'm quite sure it isn't my software that is causing this, because
if I do a simple vacuum after the rollback, and then run the same sequence
again, the final stage completes as quickly as I've come to expect.
I'm just wondering if there is a known race condition or something else
which would cause this phenomenon.
Thanks in advance.
- ---------------< LINUX: The choice of a GNU generation. >-------------
Steve Frampton <frampton@LinuxNinja.com> http://www.LinuxNinja.com
GNU Privacy Guard ID: D055EBC5 (see http://www.gnupg.org for details)
GNU-PG Fingerprint: EEFB F03D 29B6 07E8 AF73 EF6A 9A72 F1F5 D055 EBC5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7uvUJmnLx9dBV68URAoz5AJ4jIyNXAM1ly4iehXKczXEEtd1FNwCeLVEY
SKJ4PPoMK7w2WlfmoWj+rnk=
=fVJo
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Race condition in 7.1.2?
2001-10-03 11:22 Race condition in 7.1.2? Steve Frampton <frampton@LinuxNinja.com>
@ 2001-10-03 11:41 ` Steve Frampton <frampton@LinuxNinja.com>
2001-10-03 14:23 ` Re: Race condition in 7.1.2? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Steve Frampton @ 2001-10-03 11:41 UTC (permalink / raw)
To: pgsql-admin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 3 Oct 2001, Steve Frampton wrote:
> But I noticed, sometimes, the final stage of my processing never
> completes, and PostgreSQL is spiralling the CPU at almost 100%. I
> have to kill the process, which is thankfully detected by my
> application which does a rollback.
>
> Anyway, I'm quite sure it isn't my software that is causing this, because
> if I do a simple vacuum after the rollback, and then run the same sequence
> again, the final stage completes as quickly as I've come to expect.
Just thought I'd add that, when my process runs normally, PostgreSQL takes
between 30% and 50% of CPU. Only when this mysterious condition occurs
does it hit near 100%. Also, I happened to notice upon vacuuming the DB
the last time this happened, slightly larger than a multiple of my tuples
were deleted from the index -- which seems to indicate that my application
did the processing it was supposed to have done, but somehow PostgreSQL
got "stuck" on the final update.
Strange.
- ---------------< LINUX: The choice of a GNU generation. >-------------
Steve Frampton <frampton@LinuxNinja.com> http://www.LinuxNinja.com
GNU Privacy Guard ID: D055EBC5 (see http://www.gnupg.org for details)
GNU-PG Fingerprint: EEFB F03D 29B6 07E8 AF73 EF6A 9A72 F1F5 D055 EBC5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7uvlhmnLx9dBV68URAvBQAJ9oeMWMpKmw0br/ISXrlKgZLe80xQCggg5Y
R8RPG9jyVuzo2TV3qoLquLY=
=3st0
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Race condition in 7.1.2?
2001-10-03 11:22 Race condition in 7.1.2? Steve Frampton <frampton@LinuxNinja.com>
2001-10-03 11:41 ` Re: Race condition in 7.1.2? Steve Frampton <frampton@LinuxNinja.com>
@ 2001-10-03 14:23 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2001-10-03 14:23 UTC (permalink / raw)
To: Steve Frampton <frampton@LinuxNinja.com>; +Cc: pgsql-admin
There's not enough information here to give any useful answer.
A replicatable test case would be nice, or at least show us the queries
that are taking a long time and the table schemas they are working on.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-10-03 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-03 11:22 Race condition in 7.1.2? Steve Frampton <frampton@LinuxNinja.com>
2001-10-03 11:41 ` Steve Frampton <frampton@LinuxNinja.com>
2001-10-03 14:23 ` Tom Lane <tgl@sss.pgh.pa.us>
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