Re: Different transaction log for database/schema

From: "Ondrej Chaloupka" <chalda(at)seznam(dot)cz>
To: "sachin kotwal" <kotsachin(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Different transaction log for database/schema
Date: 2013-07-22 16:33:57
Message-ID: ASq.1OI1.3Slu40K6CKg.1HxLxr@seznam.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Sachin,

thank you for the idea. I didn't know about the function.
Just this probably won't work for my use case. I do not access to different
databases in one transaction. I access different databases simultaneously
each with it's own xa transaction. What I understand the switch_xlog servers
for using new file for transaction log. What I would understand is supposed
to be used e.g. for cleaning.

In my case it's normal that the two tests uses database (their own databases
but under one PostgreSQL server) and each one creates an record in the log.
E.g. when first test would call the switch_xlog and continue with work then
the second test would start and call the switch_xlog then the both tests
will still use the same transaction log despite the fact that it would be
some new one. In case that I understand the function right.

I would need to force of using different files based on user/schema/
database. Is there such possibility?

Thank you
Ondra

---------- Původní zpráva ----------
Od: sachin kotwal <kotsachin(at)gmail(dot)com>
Datum: 22. 7. 2013
Předmět: Re: [GENERAL] Different transaction log for database/schema

">where I need to run simultaneously different tests using transactions

Are you running tests simultaneously on different databases?
i.e. access to different databases within one transaction.

If not --

after each transaction you can do pg_switch_xlog() then new transaction log
will be created and next transaction details will store in new log file.

make sure that you set proper configuration parameter to keep maximum
transactions logs.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/
Different-transaction-log-for-database-schema-tp5764604p5764622.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2013-07-22 16:37:17 Re: Different transaction log for database/schema
Previous Message Jeff Janes 2013-07-22 16:20:10 Re: Insert result does not match record count