From: "David E. Wheeler" on 6 Jan 2010 17:10 On Jan 6, 2010, at 2:08 PM, Peter Eisentraut wrote: > Then I don't see much of a point in using Perl. You might as well fire > up a few psqls from a shell script If you're more comfortable with shell, then yes. Although then it won't run on Windows, will it? Best, David -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Marko Tiikkaja on 6 Jan 2010 17:13 On 2010-01-07 00:08 +0200, Peter Eisentraut wrote: > On ons, 2010-01-06 at 15:52 -0600, Kevin Grittner wrote: >> "David E. Wheeler"<david(a)kineticode.com> wrote: >> >>> Last I heard, Andrew was willing to require Test::More for >>> testing, so that a Perl script could handle multiple psql >>> connections (perhaps forked) and output test results based on >>> them. But he wasn't as interested in requiring DBI and DBD::Pg, >>> neither of which are in the Perl core and are more of a PITA to >>> install (not huge, but the barrier might as well stay low). >> >> OK, I've gotten familiar with Perl as a programming language and >> tinkered with Test::More. What's not clear to me yet is what would >> be considered good technique for launching several psql sessions >> from that environment, interleaving commands to each of them, and >> checking results from each of them as the test plan progresses. Any >> code snippets or URLs to help me understand that are welcome. (It >> seems clear enough with DBI, but I'm trying to avoid that per the >> above.) > > Then I don't see much of a point in using Perl. You might as well fire > up a few psqls from a shell script. I don't see how that would work, but I might have misunderstood what we're reaching for here. What I think would be most useful would be to interleave statements between transactions, not just randomly fire psql sessions and hope for race conditions. Regards, Marko Tiikkaja -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: "Kevin Grittner" on 6 Jan 2010 17:24 Marko Tiikkaja <marko.tiikkaja(a)cs.helsinki.fi> wrote: > On 2010-01-07 00:08 +0200, Peter Eisentraut wrote: >> Then I don't see much of a point in using Perl. You might as >> well fire up a few psqls from a shell script. > > I don't see how that would work, but I might have misunderstood > what we're reaching for here. What I think would be most useful > would be to interleave statements between transactions, not just > randomly fire psql sessions and hope for race conditions. Yeah, I want to test specific interleavings of statements on concurrent connections. There may *also* be some tests which throw a lot at the server concurrently in a more random fashion, but it is important to be able to have some very controlled tests where we don't count on randomly creating the desired conflicts. It would be valuable to be able to include some of these tests with controlled and predicatable statement interleavings in the "make check" tests. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Alvaro Herrera on 6 Jan 2010 18:04 Marko Tiikkaja wrote: > On 2010-01-07 00:08 +0200, Peter Eisentraut wrote: > >Then I don't see much of a point in using Perl. You might as well fire > >up a few psqls from a shell script. > > I don't see how that would work, but I might have misunderstood what > we're reaching for here. What I think would be most useful would be > to interleave statements between transactions, not just randomly > fire psql sessions and hope for race conditions. Open a few psql with -f pointing to a pipe, and from the shell write into the pipe? I don't think it's straightforward, but it should be possible. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: "Kevin Grittner" on 6 Jan 2010 18:11
Alvaro Herrera <alvherre(a)commandprompt.com> wrote: > Open a few psql with -f pointing to a pipe, and from the shell > write into the pipe? I don't think it's straightforward, but it > should be possible. I'll play with it and see what I can do. Thanks, -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |