Re: synchronized snapshots - Mailing list pgsql-hackers

From Tom Lane
Subject Re: synchronized snapshots
Date
Msg-id 20263.1319336100@sss.pgh.pa.us
Whole thread Raw
In response to Re: synchronized snapshots  (Thom Brown <thom@linux.com>)
Responses Re: synchronized snapshots
List pgsql-hackers
Thom Brown <thom@linux.com> writes:
> Can I ask why it doesn't return the same snapshot ID each time?
> Surely it can't change since you can only export the snapshot of a
> serializable or repeatable read transaction?

No, that's incorrect.  You can export from a READ COMMITTED transaction;
indeed, you'd more or less have to, if you want the control transaction
to be able to see what the slaves do.

> A "SELECT
> count(pg_export_snapshot()) FROM generate_series(1,10000000);" would
> quickly bork the pg_snapshots directory which any user can run.

Shrug ... you can create a much more severe DOS problem by making
zillions of tables, if the filesystem doesn't handle lots-o-files
well.
        regards, tom lane


pgsql-hackers by date:

Previous
From: nrdb
Date:
Subject: Re: database file encryption.
Next
From: Robert Haas
Date:
Subject: Re: [v9.2] make_greater_string() does not return a string in some cases