Обсуждение: Bug #708: PgTransaction class is broken since 7.2

Поиск
Список
Период
Сортировка

Bug #708: PgTransaction class is broken since 7.2

От
pgsql-bugs@postgresql.org
Дата:
Piotr Klaban (makler@man.torun.pl) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
PgTransaction class is broken since 7.2

Long Description
Hi,

You have introduced the patch
  http://www.geocrawler.com/archives/3/105/2001/2/0/5248369/
that broke my pg2xbase C++ utility, because
I can not COMMIT the transaction. Before the patch
it works exactly as it is described in the pgtransdb.h file:

// This is the database access class that keeps an open
// transaction block during its lifetime.  The block is ENDed when
// the object is destroyed.

But it is not true now. There is a private variable called
pgCommitted that is set to false in protected method BeginTransaction()
When I delete PgTransaction object - transaction is ABORTed.
I can not use EndTransaction() protected method in my C++ file
(gcc 3.0.3 complains).

Maybe both methods should be public.
Now I use PgDatabase object with two query calls BEGIN ... END
it is safer.

Best regards.


Sample Code


No file was uploaded with this report

Postgres with IBM ????????

От
Prinson
Дата:
Hi friends,

Can any body help me , whether postgres work with IBM websphere ?

if pls kindly give me the details regarding this.

thanx and regards,
prinson.

Re: Postgres with IBM ????????

От
Justin Clift
Дата:
Hi Prison,

I've created Web Sphere packages for Solaria 8, and had to install Web
Sphere numerous times in the process of getting it right (learning curve
thing).

For getting Web Sphere to work with PostgreSQL... it doesn't work right
out of the box.  When you install Web Sphere 4.0x (not sure about 4.1)
it asks which database it will be connecting to, for storing it's own
information in (not relating to any
Applications/Servers/Groups/Nodes/etc), and uses specific SQL approaches
depending upon the database selected.

PostgreSQL isn't listed in the available options here.  There may have
been a generic "SQL" option, but I don't remember seeing one for that
either.

If you get Web Sphere up and running using a different database (Oracle
8i at the time I was creating packages) then you'll find in the Web
Sphere configuration files (admin.conf file in the <WEBSPHERE_ROOT>/bin
directory I think, but I could be wrong) that you can alter the
configuration to go into a "generic SQL" mode and it appears to even be
able to optionally DO or NOT DO a 2 phase commit (which I remember
someone was telling me was important with PostgreSQL).

So, although it's not supported out-of-the-box, you may in fact somehow
be able to get it to work, with a bit of time an effort (think hours).
:)

Would have liked the time to try it myself (as this would really prove
beneficial for a lot of places) but had more urgent and important things
to do.

BTU - Generally your question is the sort of thing which you need to ask
on the PostgreSQL "General" mailing list, not via a bug report.  You'll
probably still find it more beneficial to subscribe to the "General"
mailing list and see what goes on there.

Regards and best wishes,

Justin Cleft


Prison wrote:
>
> Hi friends,
>
> Can any body help me , whether postgres work with IBM websphere ?
>
> if pls kindly give me the details regarding this.
>
> thanx and regards,
> prinson.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi

Re: Bug #708: PgTransaction class is broken since 7.2

От
Bruce Momjian
Дата:
OK, would you send us a correcting patch?  Thanks.

---------------------------------------------------------------------------

pgsql-bugs@postgresql.org wrote:
> Piotr Klaban (makler@man.torun.pl) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> PgTransaction class is broken since 7.2
>
> Long Description
> Hi,
>
> You have introduced the patch
>   http://www.geocrawler.com/archives/3/105/2001/2/0/5248369/
> that broke my pg2xbase C++ utility, because
> I can not COMMIT the transaction. Before the patch
> it works exactly as it is described in the pgtransdb.h file:
>
> // This is the database access class that keeps an open
> // transaction block during its lifetime.  The block is ENDed when
> // the object is destroyed.
>
> But it is not true now. There is a private variable called
> pgCommitted that is set to false in protected method BeginTransaction()
> When I delete PgTransaction object - transaction is ABORTed.
> I can not use EndTransaction() protected method in my C++ file
> (gcc 3.0.3 complains).
>
> Maybe both methods should be public.
> Now I use PgDatabase object with two query calls BEGIN ... END
> it is safer.
>
> Best regards.
>
>
> Sample Code
>
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026