Skip site navigation (1) Skip section navigation (2)

Single-Transaction Utility options

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Single-Transaction Utility options
Date: 2005-12-16 18:40:18
Message-ID: 1134758418.2964.29.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
The following patches add a -N option to psql and pgrestore.

This option adds a BEGIN at the start and a COMMIT at the end of all
commands, causing all statements to be executed as a single transaction.

In pgrestore the -N option also forces the -e option: exit on error.

Passes make check on cvstip, plus some other basic testing.
No docs as yet.

Patches are completely independent of each other, the only connection
between them is at the conceptual level.

[Why have I done this? This is a precursor to the introduction of
WAL-bypass for COPY, when run in the same transaction in which a table
was created. Together, they will allow faster upgrades and restores.]

Best Regards, Simon Riggs

Attachment: psqlN.patch
Description: text/x-patch (5.4 KB)
Attachment: pgrestoreN.patch
Description: text/x-patch (3.7 KB)


pgsql-patches by date

Next:From: Tom LaneDate: 2005-12-16 18:59:03
Subject: Re: Single-Transaction Utility options
Previous:From: Simon RiggsDate: 2005-12-16 13:17:25
Subject: Re: How much expensive are row level statistics?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group