pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_sample
25+ messages / 13 participants
[nested] [flat]
* pg_sample
@ 2016-10-19 00:24 Patrick B <patrickbakerbr@gmail.com>
2016-10-19 00:39 ` Re: pg_sample Michael Paquier <michael.paquier@gmail.com>
2016-10-19 02:58 ` Re: pg_sample Greg Sabino Mullane <greg@turnstep.com>
2016-10-19 09:32 ` Re: pg_sample Karsten Hilbert <Karsten.Hilbert@gmx.net>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
0 siblings, 4 replies; 25+ messages in thread
From: Patrick B @ 2016-10-19 00:24 UTC (permalink / raw)
To: pgsql-general
Hi guys,
I got a very big database, that I need to export (dump) into a new test
server.
However, this new database test server doesn't need to have all the data. I
would like to have only the first 100 rows(example) of each table in my
database.
I'm using pg_sample to do that, but unfortunately it doesn't work well.
It doesn't get the first 100 rows. It gets random 100 rows.
Do you guys have any idea how could I do this?
Thanks
Patrick
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
@ 2016-10-19 00:39 ` Michael Paquier <michael.paquier@gmail.com>
2016-10-19 01:30 ` Re: pg_sample Patrick B <patrickbakerbr@gmail.com>
3 siblings, 1 reply; 25+ messages in thread
From: Michael Paquier @ 2016-10-19 00:39 UTC (permalink / raw)
To: Patrick B <patrickbakerbr@gmail.com>; +Cc: pgsql-general
On Wed, Oct 19, 2016 at 9:24 AM, Patrick B <patrickbakerbr@gmail.com> wrote:
> However, this new database test server doesn't need to have all the data. I
> would like to have only the first 100 rows(example) of each table in my
> database.
>
> I'm using pg_sample to do that, but unfortunately it doesn't work well.
> It doesn't get the first 100 rows. It gets random 100 rows.
Why aren't 100 random rows enough to fulfill what you are looking for?
What you are trying here is to test the server with some sample data,
no? In this case, having the first 100 rows, or a set of random ones
should not matter much (never tried pg_sample to be honest).
--
Michael
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 00:39 ` Re: pg_sample Michael Paquier <michael.paquier@gmail.com>
@ 2016-10-19 01:30 ` Patrick B <patrickbakerbr@gmail.com>
2016-10-19 02:21 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 25+ messages in thread
From: Patrick B @ 2016-10-19 01:30 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-general
2016-10-19 13:39 GMT+13:00 Michael Paquier <michael.paquier@gmail.com>:
> On Wed, Oct 19, 2016 at 9:24 AM, Patrick B <patrickbakerbr@gmail.com>
> wrote:
> > However, this new database test server doesn't need to have all the
> data. I
> > would like to have only the first 100 rows(example) of each table in my
> > database.
> >
> > I'm using pg_sample to do that, but unfortunately it doesn't work well.
> > It doesn't get the first 100 rows. It gets random 100 rows.
>
> Why aren't 100 random rows enough to fulfill what you are looking for?
> What you are trying here is to test the server with some sample data,
> no? In this case, having the first 100 rows, or a set of random ones
> should not matter much (never tried pg_sample to be honest).
> --
> Michael
>
Actually it does matter because there is some essential data that has to be
in there so the code can work.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 00:39 ` Re: pg_sample Michael Paquier <michael.paquier@gmail.com>
2016-10-19 01:30 ` Re: pg_sample Patrick B <patrickbakerbr@gmail.com>
@ 2016-10-19 02:21 ` Adrian Klaver <adrian.klaver@aklaver.com>
2016-10-19 02:39 ` Re: pg_sample Melvin Davidson <melvin6925@gmail.com>
0 siblings, 1 reply; 25+ messages in thread
From: Adrian Klaver @ 2016-10-19 02:21 UTC (permalink / raw)
To: Patrick B <patrickbakerbr@gmail.com>; Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-general
On 10/18/2016 06:30 PM, Patrick B wrote:
>
>
> 2016-10-19 13:39 GMT+13:00 Michael Paquier <michael.paquier@gmail.com
> <mailto:michael.paquier@gmail.com>>:
>
> On Wed, Oct 19, 2016 at 9:24 AM, Patrick B <patrickbakerbr@gmail.com
> <mailto:patrickbakerbr@gmail.com>> wrote:
> > However, this new database test server doesn't need to have all the data. I
> > would like to have only the first 100 rows(example) of each table in my
> > database.
> >
> > I'm using pg_sample to do that, but unfortunately it doesn't work well.
> > It doesn't get the first 100 rows. It gets random 100 rows.
>
> Why aren't 100 random rows enough to fulfill what you are looking for?
> What you are trying here is to test the server with some sample data,
> no? In this case, having the first 100 rows, or a set of random ones
> should not matter much (never tried pg_sample to be honest).
> --
> Michael
>
>
>
> Actually it does matter because there is some essential data that has to
> be in there so the code can work.
Well random does not know essential, it is after all random. If you want
to test specific cases then you will need to build appropriate data sets.
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 00:39 ` Re: pg_sample Michael Paquier <michael.paquier@gmail.com>
2016-10-19 01:30 ` Re: pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 02:21 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
@ 2016-10-19 02:39 ` Melvin Davidson <melvin6925@gmail.com>
0 siblings, 0 replies; 25+ messages in thread
From: Melvin Davidson @ 2016-10-19 02:39 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Patrick B <patrickbakerbr@gmail.com>; Michael Paquier <michael.paquier@gmail.com>; pgsql-general
On Tue, Oct 18, 2016 at 10:21 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
> On 10/18/2016 06:30 PM, Patrick B wrote:
>
>>
>>
>> 2016-10-19 13:39 GMT+13:00 Michael Paquier <michael.paquier@gmail.com
>> <mailto:michael.paquier@gmail.com>>:
>>
>> On Wed, Oct 19, 2016 at 9:24 AM, Patrick B <patrickbakerbr@gmail.com
>> <mailto:patrickbakerbr@gmail.com>> wrote:
>> > However, this new database test server doesn't need to have all the
>> data. I
>> > would like to have only the first 100 rows(example) of each table
>> in my
>> > database.
>> >
>> > I'm using pg_sample to do that, but unfortunately it doesn't work
>> well.
>> > It doesn't get the first 100 rows. It gets random 100 rows.
>>
>> Why aren't 100 random rows enough to fulfill what you are looking for?
>> What you are trying here is to test the server with some sample data,
>> no? In this case, having the first 100 rows, or a set of random ones
>> should not matter much (never tried pg_sample to be honest).
>> --
>> Michael
>>
>>
>>
>> Actually it does matter because there is some essential data that has to
>> be in there so the code can work.
>>
>
> Well random does not know essential, it is after all random. If you want
> to test specific cases then you will need to build appropriate data sets.
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
The following query should generate statements you can use to get the first
100 rows of every table.
You may need to tweak a bit as order is not guaranteed.
SELECT 'COPY ' || quote_ident(n.nspname) || '.' || quote_ident(c.relname)
|| ' TO '''
-- || 'C:\temp\'
|| '/tmp/'
|| quote_ident(n.nspname) || '_' || quote_ident(c.relname) || '.csv' ||
''''
|| ' WITH CSV HEADER FORCE_QUOTE *;'
FROM pg_class c
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE relkind = 'r'
AND relname NOT LIKE 'pg_%'
AND relname NOT LIKE 'sql_%'
LIMIT 100;
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
@ 2016-10-19 02:58 ` Greg Sabino Mullane <greg@turnstep.com>
2016-10-19 03:15 ` Re: pg_sample Charles Clavadetscher <clavadetscher@swisspug.org>
3 siblings, 1 reply; 25+ messages in thread
From: Greg Sabino Mullane @ 2016-10-19 02:58 UTC (permalink / raw)
To: pgsql-general; +Cc: patrickbakerbr@gmail.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Patrick B <patrickbakerbr@gmail.com> writes:
...
> However, this new database test server doesn't need to have all the data. I
> would like to have only the first 100 rows(example) of each table in my
> database.
...
This should do what you ask.
If the order does not matter, leave out the ORDER BY.
This assumes everything of interest is in the public schema.
$ createdb testdb
$ pg_dump realdb --schema-only | psql -q testdb
$ psql realdb
psql> \o dump.some.rows.sh
psql> select format($$psql realdb -c 'COPY (select * from %I order by 1 limit %s) TO STDOUT' | psql testdb -c 'COPY %I FROM STDIN' $$, table_name, 100, table_name)
from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE';
psql> \q
$ sh dump.some.rows.sh
- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201610182256
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAlgG4NkACgkQvJuQZxSWSsge4ACePhBOBtBFnGNxXt5qpY7X+w3o
d04AoKTzAgxcaqy8qfIE0LPuzG9x0KIU
=sS+m
-----END PGP SIGNATURE-----
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 02:58 ` Re: pg_sample Greg Sabino Mullane <greg@turnstep.com>
@ 2016-10-19 03:15 ` Charles Clavadetscher <clavadetscher@swisspug.org>
2016-10-19 04:05 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2016-10-19 18:03 ` Re: pg_sample Greg Sabino Mullane <greg@turnstep.com>
0 siblings, 2 replies; 25+ messages in thread
From: Charles Clavadetscher @ 2016-10-19 03:15 UTC (permalink / raw)
To: Greg Sabino Mullane <greg@turnstep.com>; pgsql-general; +Cc: patrickbakerbr@gmail.com
Hello
On 10/19/2016 04:58 AM, Greg Sabino Mullane wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
> Patrick B <patrickbakerbr@gmail.com> writes:
> ...
>> However, this new database test server doesn't need to have all the data. I
>> would like to have only the first 100 rows(example) of each table in my
>> database.
> ...
>
> This should do what you ask.
>
> If the order does not matter, leave out the ORDER BY.
>
> This assumes everything of interest is in the public schema.
>
> $ createdb testdb
> $ pg_dump realdb --schema-only | psql -q testdb
> $ psql realdb
>
> psql> \o dump.some.rows.sh
> psql> select format($$psql realdb -c 'COPY (select * from %I order by 1 limit %s) TO STDOUT' | psql testdb -c 'COPY %I FROM STDIN' $$, table_name, 100, table_name)
> from information_schema.tables where table_schema = 'public' and table_type = 'BASE TABLE';
> psql> \q
>
> $ sh dump.some.rows.sh
I may be overseeing something, but what about dependencies between
tables, sequencies, indexes, etc.? I guess that if one takes the first
100 rows of a table referenced by another table, there is no guarantee
that in the first 100 rows of the referencing table there will not be
some foreign key that does not exist.
Regards
Charles
>
> - --
> Greg Sabino Mullane greg@turnstep.com
> End Point Corporation http://www.endpoint.com/
> PGP Key: 0x14964AC8 201610182256
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> -----BEGIN PGP SIGNATURE-----
>
> iEYEAREDAAYFAlgG4NkACgkQvJuQZxSWSsge4ACePhBOBtBFnGNxXt5qpY7X+w3o
> d04AoKTzAgxcaqy8qfIE0LPuzG9x0KIU
> =sS+m
> -----END PGP SIGNATURE-----
>
>
>
>
--
Swiss PostgreSQL Users Group
c/o Charles Clavadetscher
Treasurer
Motorenstrasse 18
CH – 8005 Zürich
http://www.swisspug.org
+-----------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) _/ |
| \ /\_/ \)/ |
| \/ <//| |\\> |
| _| | |
| \|_/ |
| |
| PostgreSQL 1996-2016 |
| 20 Years of Success |
| |
+-----------------------+
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 02:58 ` Re: pg_sample Greg Sabino Mullane <greg@turnstep.com>
2016-10-19 03:15 ` Re: pg_sample Charles Clavadetscher <clavadetscher@swisspug.org>
@ 2016-10-19 04:05 ` Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 0 replies; 25+ messages in thread
From: Adrian Klaver @ 2016-10-19 04:05 UTC (permalink / raw)
To: Charles Clavadetscher <clavadetscher@swisspug.org>; Greg Sabino Mullane <greg@turnstep.com>; pgsql-general; +Cc: patrickbakerbr@gmail.com
On 10/18/2016 08:15 PM, Charles Clavadetscher wrote:
> Hello
>
> On 10/19/2016 04:58 AM, Greg Sabino Mullane wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: RIPEMD160
>>
>>
>> Patrick B <patrickbakerbr@gmail.com> writes:
>> ...
>>> However, this new database test server doesn't need to have all the
>>> data. I
>>> would like to have only the first 100 rows(example) of each table in my
>>> database.
>> ...
>>
>> This should do what you ask.
>>
>> If the order does not matter, leave out the ORDER BY.
>>
>> This assumes everything of interest is in the public schema.
>>
>> $ createdb testdb
>> $ pg_dump realdb --schema-only | psql -q testdb
>> $ psql realdb
>>
>> psql> \o dump.some.rows.sh
>> psql> select format($$psql realdb -c 'COPY (select * from %I order by
>> 1 limit %s) TO STDOUT' | psql testdb -c 'COPY %I FROM STDIN' $$,
>> table_name, 100, table_name)
>> from information_schema.tables where table_schema = 'public' and
>> table_type = 'BASE TABLE';
>> psql> \q
>>
>> $ sh dump.some.rows.sh
>
> I may be overseeing something, but what about dependencies between
> tables, sequencies, indexes, etc.? I guess that if one takes the first
> 100 rows of a table referenced by another table, there is no guarantee
> that in the first 100 rows of the referencing table there will not be
> some foreign key that does not exist.
Well there is:
https://github.com/18F/rdbms-subsetter
That still does not guarantee that the rows selected cover your test
cases though.
>
> Regards
> Charles
>
>>
>> - --
>> Greg Sabino Mullane greg@turnstep.com
>> End Point Corporation http://www.endpoint.com/
>> PGP Key: 0x14964AC8 201610182256
>> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
>> -----BEGIN PGP SIGNATURE-----
>>
>> iEYEAREDAAYFAlgG4NkACgkQvJuQZxSWSsge4ACePhBOBtBFnGNxXt5qpY7X+w3o
>> d04AoKTzAgxcaqy8qfIE0LPuzG9x0KIU
>> =sS+m
>> -----END PGP SIGNATURE-----
>>
>>
>>
>>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 02:58 ` Re: pg_sample Greg Sabino Mullane <greg@turnstep.com>
2016-10-19 03:15 ` Re: pg_sample Charles Clavadetscher <clavadetscher@swisspug.org>
@ 2016-10-19 18:03 ` Greg Sabino Mullane <greg@turnstep.com>
1 sibling, 0 replies; 25+ messages in thread
From: Greg Sabino Mullane @ 2016-10-19 18:03 UTC (permalink / raw)
To: pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
> I may be overseeing something, but what about dependencies between
> tables, sequencies, indexes, etc.? I guess that if one takes the first
> 100 rows of a table referenced by another table, there is no guarantee
> that in the first 100 rows of the referencing table there will not be
> some foreign key that does not exist.
The only dependency that should matter is foreign keys, and yeah, if you
have those, all bets are off; one would need to write something very custom
indeed to slurp out the data. I could envision some workarounds, but it
really depends on exactly what the OP is trying to achieve.
- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201610191401
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAlgHtV8ACgkQvJuQZxSWSsgrzQCglNFhkdnfg4ECC1l3l0F/Uqt0
ID4AnjGHOTR5Tsfn8MwmyBItTrOg1w7Y
=6qOO
-----END PGP SIGNATURE-----
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
@ 2016-10-19 09:32 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
3 siblings, 0 replies; 25+ messages in thread
From: Karsten Hilbert @ 2016-10-19 09:32 UTC (permalink / raw)
To: pgsql-general
On Wed, Oct 19, 2016 at 01:24:10PM +1300, Patrick B wrote:
> I'm using pg_sample to do that, but unfortunately it doesn't work well.
> It doesn't get the first 100 rows. It gets random 100 rows.
>
> Do you guys have any idea how could I do this?
For any relevant answer to this question you'll have to
define what "first" means in the context of "first 100 rows".
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
@ 2018-08-23 07:10 ` naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
3 siblings, 1 reply; 25+ messages in thread
From: naveen12 @ 2018-08-23 07:10 UTC (permalink / raw)
To: pgsql-general
i have installed postgresql on centos.
i want to use pg_sample.
Do i need to install that separately of it's included in the postgresql
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
@ 2018-08-23 13:04 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
0 siblings, 1 reply; 25+ messages in thread
From: Adrian Klaver @ 2018-08-23 13:04 UTC (permalink / raw)
To: naveen12 <naveen@paymonk.com>; pgsql-general
On 08/23/2018 12:10 AM, naveen12 wrote:
> i have installed postgresql on centos.
> i want to use pg_sample.
>
> Do i need to install that separately of it's included in the postgresql
It is not included in the Postgres core or contrib packages. You will
need to install it separately.
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-08-23 14:39 ` Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:47 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 2 replies; 25+ messages in thread
From: Naveen Dabas @ 2018-08-23 14:39 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
sir from where should i install it.
I tried but i didn't found separate link for pg_sample
can you help me in this
thanks
On Thu, Aug 23, 2018 at 6:34 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
> On 08/23/2018 12:10 AM, naveen12 wrote:
>
>> i have installed postgresql on centos.
>> i want to use pg_sample.
>>
>> Do i need to install that separately of it's included in the postgresql
>>
>
> It is not included in the Postgres core or contrib packages. You will need
> to install it separately.
>
>
>>
>>
>> --
>> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f184378
>> 0.html
>>
>>
>>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
--
--
With Regards
Naveen Dabas
Ph. 9017298370
--
*Important Disclaimer:* Information contained in this email is for the
recipient primarily addressed to. If you are not the primary recipient or
are not supposed to receive this email, you are advised to kindly delete
the email or the thread and notify of the error. The logo is a registered
and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not
use it without authorization.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
@ 2018-08-23 14:47 ` Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 0 replies; 25+ messages in thread
From: Adrian Klaver @ 2018-08-23 14:47 UTC (permalink / raw)
To: Naveen Dabas <naveen@paymonk.com>; +Cc: pgsql-general
On 08/23/2018 07:39 AM, Naveen Dabas wrote:
> sir from where should i install it.
> I tried but i didn't found separate link for pg_sample
> can you help me in this
I am guessing it is this:
https://github.com/mla/pg_sample
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
@ 2018-08-23 14:52 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
1 sibling, 1 reply; 25+ messages in thread
From: Adrian Klaver @ 2018-08-23 14:52 UTC (permalink / raw)
To: Naveen Dabas <naveen@paymonk.com>; +Cc: pgsql-general
On 08/23/2018 07:39 AM, Naveen Dabas wrote:
> sir from where should i install it.
> I tried but i didn't found separate link for pg_sample
> can you help me in this
Something similar:
https://github.com/18F/rdbms-subsetter
It is Python based and can be pip installed.
>
>
> thanks
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-08-24 10:38 ` Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
0 siblings, 1 reply; 25+ messages in thread
From: Naveen Dabas @ 2018-08-24 10:38 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
sir have taken pg_sample
Now i want to run pg_sample with credential but i'm getting this error
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
./pg_sample line 192.
BEGIN failed--compilation aborted at ./pg_sample line 192.
can you help me in this
thanks
On Thu, Aug 23, 2018 at 8:22 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
> On 08/23/2018 07:39 AM, Naveen Dabas wrote:
>
>> sir from where should i install it.
>> I tried but i didn't found separate link for pg_sample
>> can you help me in this
>>
>
>
> Something similar:
>
> https://github.com/18F/rdbms-subsetter
>
> It is Python based and can be pip installed.
>
>
>>
>> thanks
>>
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
--
--
With Regards
Naveen Dabas
Ph. 9017298370
--
*Important Disclaimer:* Information contained in this email is for the
recipient primarily addressed to. If you are not the primary recipient or
are not supposed to receive this email, you are advised to kindly delete
the email or the thread and notify of the error. The logo is a registered
and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not
use it without authorization.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
@ 2018-08-24 12:43 ` Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
0 siblings, 1 reply; 25+ messages in thread
From: Ravi Krishna @ 2018-08-24 12:43 UTC (permalink / raw)
To: Naveen Dabas <naveen@paymonk.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
>
> sir have taken pg_sample
> Now i want to run pg_sample with credential but i'm getting this error
>
> Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./pg_sample line 192.
> BEGIN failed--compilation aborted at ./pg_sample line 192.
As is clear from the message, you need to install Perl DBI/DBD first.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
@ 2018-08-24 12:46 ` Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
0 siblings, 1 reply; 25+ messages in thread
From: Abhinav Mehta @ 2018-08-24 12:46 UTC (permalink / raw)
To: Ravi Krishna <sravikrishna@aol.com>; +Cc: Naveen Dabas <naveen@paymonk.com>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
Solution, execute this on your linux terminal -
$ perl -MCPAN -e 'install Bundle::DBI'
$ perl -MCPAN -e 'install DBD::Pg'
> On 24-Aug-2018, at 6:13 PM, Ravi Krishna <sravikrishna@aol.com> wrote:
>
>>
>> sir have taken pg_sample
>> Now i want to run pg_sample with credential but i'm getting this error
>>
>> Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./pg_sample line 192.
>> BEGIN failed--compilation aborted at ./pg_sample line 192.
>
> As is clear from the message, you need to install Perl DBI/DBD first.
>
>
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
@ 2018-08-25 05:44 ` Naveen Dabas <naveen@paymonk.com>
2018-08-26 19:57 ` Re: pg_sample Paul Carlucci <paul.carlucci@gmail.com>
0 siblings, 1 reply; 25+ messages in thread
From: Naveen Dabas @ 2018-08-25 05:44 UTC (permalink / raw)
To: Abhinav Mehta <abhinav@metarain.com>; +Cc: Ravi Krishna <sravikrishna@aol.com>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
Sir i'm getting error in both commands
[root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install Bundle::DBI'
Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
BEGIN failed--compilation aborted.
[root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install DBD::Pg'
Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
BEGIN failed--compilation aborted.
operating system =CentOS Linux release 7.5.1804 (Core)
thanks
On Fri, Aug 24, 2018 at 6:16 PM, Abhinav Mehta <abhinav@metarain.com> wrote:
> Solution, execute this on your linux terminal -
>
> $ perl -MCPAN -e 'install Bundle::DBI'
> $ perl -MCPAN -e 'install DBD::Pg'
>
> > On 24-Aug-2018, at 6:13 PM, Ravi Krishna <sravikrishna@aol.com> wrote:
> >
> >>
> >> sir have taken pg_sample
> >> Now i want to run pg_sample with credential but i'm getting this error
> >>
> >> Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5
> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
> ./pg_sample line 192.
> >> BEGIN failed--compilation aborted at ./pg_sample line 192.
> >
> > As is clear from the message, you need to install Perl DBI/DBD first.
> >
> >
>
>
--
--
With Regards
Naveen Dabas
Ph. 9017298370
--
*Important Disclaimer:* Information contained in this email is for the
recipient primarily addressed to. If you are not the primary recipient or
are not supposed to receive this email, you are advised to kindly delete
the email or the thread and notify of the error. The logo is a registered
and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not
use it without authorization.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
@ 2018-08-26 19:57 ` Paul Carlucci <paul.carlucci@gmail.com>
2018-08-27 06:03 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
0 siblings, 1 reply; 25+ messages in thread
From: Paul Carlucci @ 2018-08-26 19:57 UTC (permalink / raw)
To: Naveen Dabas <naveen@paymonk.com>; +Cc: Abhinav Mehta <abhinav@metarain.com>; Ravi Krishna <sravikrishna@aol.com>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
sudo yum install perl-CPAN
Also do a "yum search perl-" and you should find most, if not all what you
need natively packaged for your particular Linux distro. You're better off
just sticking with the pre-packaged perl modules unless you specifically
need something special.
You'll find more modules if you also enable the EPEL yum repo by setting
enabled=1 in the first section of /etc/yum.repos.d/epel.conf and rerunning
that yum search command.
On Sun, Aug 26, 2018, 2:20 PM Naveen Dabas <naveen@paymonk.com> wrote:
> Sir i'm getting error in both commands
>
> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install Bundle::DBI'
> Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5
> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
> BEGIN failed--compilation aborted.
> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install DBD::Pg'
> Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5
> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
> BEGIN failed--compilation aborted.
>
>
>
> operating system =CentOS Linux release 7.5.1804 (Core)
>
> thanks
>
>
> On Fri, Aug 24, 2018 at 6:16 PM, Abhinav Mehta <abhinav@metarain.com>
> wrote:
>
>> Solution, execute this on your linux terminal -
>>
>> $ perl -MCPAN -e 'install Bundle::DBI'
>> $ perl -MCPAN -e 'install DBD::Pg'
>>
>> > On 24-Aug-2018, at 6:13 PM, Ravi Krishna <sravikrishna@aol.com> wrote:
>> >
>> >>
>> >> sir have taken pg_sample
>> >> Now i want to run pg_sample with credential but i'm getting this error
>> >>
>> >> Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5
>> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
>> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
>> ./pg_sample line 192.
>> >> BEGIN failed--compilation aborted at ./pg_sample line 192.
>> >
>> > As is clear from the message, you need to install Perl DBI/DBD first.
>> >
>> >
>>
>>
>
>
> --
> --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
> *Important Disclaimer:* Information contained in this email is for the
> recipient primarily addressed to. If you are not the primary recipient or
> are not supposed to receive this email, you are advised to kindly delete
> the email or the thread and notify of the error. The logo is a registered
> and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not
> use it without authorization.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-26 19:57 ` Re: pg_sample Paul Carlucci <paul.carlucci@gmail.com>
@ 2018-08-27 06:03 ` Naveen Dabas <naveen@paymonk.com>
2018-08-27 14:12 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-29 12:23 ` Re: pg_sample Daniel Verite <daniel@manitou-mail.org>
0 siblings, 2 replies; 25+ messages in thread
From: Naveen Dabas @ 2018-08-27 06:03 UTC (permalink / raw)
To: Paul Carlucci <paul.carlucci@gmail.com>; +Cc: Abhinav Mehta <abhinav@metarain.com>; Ravi Krishna <sravikrishna@aol.com>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
Server encoding is UTF8
Client encoding is UTF8
Creating sample schema sampledb1
DBD::Pg::db do failed: ERROR: cannot execute CREATE SCHEMA in a read-only
transaction at ./pg_sample line 296.
main::__ANON__('DBD::Pg::db do failed: ERROR: cannot execute CREATE SCHEMA
i...', 'DBI::db=HASH(0xab2388)', undef) called at ./pg_sample line 478
Done.
can you help me in this
thanks
On Mon, Aug 27, 2018 at 11:16 AM, Naveen Dabas <naveen@paymonk.com> wrote:
> Thanks for the help.
> But now i'm getting some different error as i rum this command
> ./pg_sample -a -f file.sql --limit="user = 100" --schema=dbname -h
> hostname -U user -W password
>
> I am not getting output and one file opens , in that file there id guide
> for pg_sample
> ----
> /tmp/9REOT5C
>
> NAME
> pg_sample - extract a small, sample dataset from a larger PostgreSQL
> database while maintaining referential integrity.
> =head1 SYNOPSIS
> pg_sample [ option... ] [ dbname ]
> =head1 DESCRIPTION
> pg_sample is a utility for exporting a small, sample dataset from a
> larger PostgreSQL database. The output and command-line options closely
> resemble the pg_dump backup utility (although only the plain-text format
> is supported).
> The sample database produced includes all tables from the original,
> maintains referential integrity, and supports circular dependencies.
> To build an actual instance of the sample database, the output of this
> script
> can be piped to the psql utility. For example, assuming we have an existing
> PostgreSQL database named "mydb", a sample database could be constructed
> with:
> createdb sampledb
> pg_sample mydb | psql sampledb
> and so on .......
>
> On Mon, Aug 27, 2018 at 1:27 AM, Paul Carlucci <paul.carlucci@gmail.com>
> wrote:
>
>> sudo yum install perl-CPAN
>>
>> Also do a "yum search perl-" and you should find most, if not all what
>> you need natively packaged for your particular Linux distro. You're better
>> off just sticking with the pre-packaged perl modules unless you
>> specifically need something special.
>>
>> You'll find more modules if you also enable the EPEL yum repo by setting
>> enabled=1 in the first section of /etc/yum.repos.d/epel.conf and rerunning
>> that yum search command.
>>
>> On Sun, Aug 26, 2018, 2:20 PM Naveen Dabas <naveen@paymonk.com> wrote:
>>
>>> Sir i'm getting error in both commands
>>>
>>> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install Bundle::DBI'
>>> Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5
>>> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
>>> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
>>> BEGIN failed--compilation aborted.
>>> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install DBD::Pg'
>>> Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5
>>> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
>>> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
>>> BEGIN failed--compilation aborted.
>>>
>>>
>>>
>>> operating system =CentOS Linux release 7.5.1804 (Core)
>>>
>>> thanks
>>>
>>>
>>> On Fri, Aug 24, 2018 at 6:16 PM, Abhinav Mehta <abhinav@metarain.com>
>>> wrote:
>>>
>>>> Solution, execute this on your linux terminal -
>>>>
>>>> $ perl -MCPAN -e 'install Bundle::DBI'
>>>> $ perl -MCPAN -e 'install DBD::Pg'
>>>>
>>>> > On 24-Aug-2018, at 6:13 PM, Ravi Krishna <sravikrishna@aol.com>
>>>> wrote:
>>>> >
>>>> >>
>>>> >> sir have taken pg_sample
>>>> >> Now i want to run pg_sample with credential but i'm getting this
>>>> error
>>>> >>
>>>> >> Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5
>>>> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
>>>> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
>>>> ./pg_sample line 192.
>>>> >> BEGIN failed--compilation aborted at ./pg_sample line 192.
>>>> >
>>>> > As is clear from the message, you need to install Perl DBI/DBD first.
>>>> >
>>>> >
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> With Regards
>>> Naveen Dabas
>>> Ph. 9017298370
>>>
>>>
>>> *Important Disclaimer:* Information contained in this email is for the
>>> recipient primarily addressed to. If you are not the primary recipient or
>>> are not supposed to receive this email, you are advised to kindly delete
>>> the email or the thread and notify of the error. The logo is a registered
>>> and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do
>>> not use it without authorization.
>>
>>
>
>
> --
> --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
--
--
With Regards
Naveen Dabas
Ph. 9017298370
--
*Important Disclaimer:* Information contained in this email is for the
recipient primarily addressed to. If you are not the primary recipient or
are not supposed to receive this email, you are advised to kindly delete
the email or the thread and notify of the error. The logo is a registered
and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not
use it without authorization.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-26 19:57 ` Re: pg_sample Paul Carlucci <paul.carlucci@gmail.com>
2018-08-27 06:03 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
@ 2018-08-27 14:12 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-27 15:33 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
1 sibling, 1 reply; 25+ messages in thread
From: Adrian Klaver @ 2018-08-27 14:12 UTC (permalink / raw)
To: Naveen Dabas <naveen@paymonk.com>; Paul Carlucci <paul.carlucci@gmail.com>; +Cc: Abhinav Mehta <abhinav@metarain.com>; Ravi Krishna <sravikrishna@aol.com>; pgsql-general
On 08/26/2018 11:03 PM, Naveen Dabas wrote:
> Server encoding is UTF8
> Client encoding is UTF8
> Creating sample schema sampledb1
> DBD::Pg::db do failed: ERROR: cannot execute CREATE SCHEMA in a
> read-only transaction at ./pg_sample line 296.
> main::__ANON__('DBD::Pg::db do failed: ERROR: cannot execute CREATE
> SCHEMA i...', 'DBI::db=HASH(0xab2388)', undef) called at ./pg_sample
> line 478
> Done.
>
>
> can you help me in this
Yes, by suggesting you try something other then pg_sample. The last
commit was 4 years ago and it does not seem to be up to date enough.
What sort of sampling do you want to do?
> thanks
>
> On Mon, Aug 27, 2018 at 11:16 AM, Naveen Dabas <naveen@paymonk.com
> <mailto:naveen@paymonk.com>> wrote:
>
> Thanks for the help.
> But now i'm getting some different error as i rum this command
> ./pg_sample -a -f file.sql --limit="user = 100" --schema=dbname -h
> hostname -U user -W password
>
> I am not getting output and one file opens , in that file there id
> guide for pg_sample
> ----
> /tmp/9REOT5C
>
> NAME
> pg_sample - extract a small, sample dataset from a larger PostgreSQL
> database while maintaining referential integrity.
> =head1 SYNOPSIS
> pg_sample [ option... ] [ dbname ]
> =head1 DESCRIPTION
> pg_sample is a utility for exporting a small, sample dataset from a
> larger PostgreSQL database. The output and command-line options closely
> resemble the pg_dump backup utility (although only the plain-text format
> is supported).
> The sample database produced includes all tables from the original,
> maintains referential integrity, and supports circular dependencies.
> To build an actual instance of the sample database, the output of
> this script
> can be piped to the psql utility. For example, assuming we have an
> existing
> PostgreSQL database named "mydb", a sample database could be
> constructed with:
> createdb sampledb
> pg_sample mydb | psql sampledb
> and so on .......
>
> On Mon, Aug 27, 2018 at 1:27 AM, Paul Carlucci
> <paul.carlucci@gmail.com <mailto:paul.carlucci@gmail.com>> wrote:
>
> sudo yum install perl-CPAN
>
> Also do a "yum search perl-" and you should find most, if not
> all what you need natively packaged for your particular Linux
> distro. You're better off just sticking with the pre-packaged
> perl modules unless you specifically need something special.
>
> You'll find more modules if you also enable the EPEL yum repo by
> setting enabled=1 in the first section of
> /etc/yum.repos.d/epel.conf and rerunning that yum search command.
>
> On Sun, Aug 26, 2018, 2:20 PM Naveen Dabas <naveen@paymonk.com
> <mailto:naveen@paymonk.com>> wrote:
>
> Sir i'm getting error in both commands
>
> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install Bundle::DBI'
> Can't locate CPAN.pm in @INC (@INC contains:
> /usr/local/lib64/perl5 /usr/local/share/perl5
> /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
> /usr/lib64/perl5 /usr/share/perl5 .).
> BEGIN failed--compilation aborted.
> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install DBD::Pg'
> Can't locate CPAN.pm in @INC (@INC contains:
> /usr/local/lib64/perl5 /usr/local/share/perl5
> /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
> /usr/lib64/perl5 /usr/share/perl5 .).
> BEGIN failed--compilation aborted.
>
>
>
> operating system =CentOS Linux release 7.5.1804 (Core)
>
> thanks
>
>
> On Fri, Aug 24, 2018 at 6:16 PM, Abhinav Mehta
> <abhinav@metarain.com <mailto:abhinav@metarain.com>> wrote:
>
> Solution, execute this on your linux terminal -
>
> $ perl -MCPAN -e 'install Bundle::DBI'
> $ perl -MCPAN -e 'install DBD::Pg'
>
> > On 24-Aug-2018, at 6:13 PM, Ravi Krishna
> <sravikrishna@aol.com <mailto:sravikrishna@aol.com>> wrote:
> >
> >>
> >> sir have taken pg_sample
> >> Now i want to run pg_sample with credential but i'm
> getting this error
> >>
> >> Can't locate DBI.pm in @INC (@INC contains:
> /usr/local/lib64/perl5 /usr/local/share/perl5
> /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5
> /usr/share/perl5 .) at ./pg_sample line 192.
> >> BEGIN failed--compilation aborted at ./pg_sample
> line 192.
> >
> > As is clear from the message, you need to install
> Perl DBI/DBD first.
> >
> >
>
>
>
>
> --
> --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
> *Important Disclaimer:* Information contained in this email
> is for the recipient primarily addressed to. If you are not
> the primary recipient or are not supposed to receive this
> email, you are advised to kindly delete the email or the
> thread and notify of the error. The logo is a registered and
> copyrighted property of *ACTAS TECHNOLOGIES PRIVATE
> LIMITED*. Do not use it without authorization.
>
>
>
>
> --
> --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
>
>
> --
> --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
> *Important Disclaimer:* Information contained in this email is for the
> recipient primarily addressed to. If you are not the primary recipient
> or are not supposed to receive this email, you are advised to kindly
> delete the email or the thread and notify of the error. The logo is a
> registered and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE
> LIMITED*. Do not use it without authorization.
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-26 19:57 ` Re: pg_sample Paul Carlucci <paul.carlucci@gmail.com>
2018-08-27 06:03 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-27 14:12 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-08-27 15:33 ` Naveen Dabas <naveen@paymonk.com>
2018-08-28 00:09 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 25+ messages in thread
From: Naveen Dabas @ 2018-08-27 15:33 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Paul Carlucci <paul.carlucci@gmail.com>; Abhinav Mehta <abhinav@metarain.com>; Ravi Krishna <sravikrishna@aol.com>; pgsql-general
actually i want limited data from the postgres database. But i don't want
to use .csv
thanks
On Mon, Aug 27, 2018 at 7:42 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
> On 08/26/2018 11:03 PM, Naveen Dabas wrote:
>
>> Server encoding is UTF8
>> Client encoding is UTF8
>> Creating sample schema sampledb1
>> DBD::Pg::db do failed: ERROR: cannot execute CREATE SCHEMA in a
>> read-only transaction at ./pg_sample line 296.
>> main::__ANON__('DBD::Pg::db do failed: ERROR: cannot execute CREATE
>> SCHEMA i...', 'DBI::db=HASH(0xab2388)', undef) called at ./pg_sample line
>> 478
>> Done.
>>
>>
>> can you help me in this
>>
>
> Yes, by suggesting you try something other then pg_sample. The last commit
> was 4 years ago and it does not seem to be up to date enough.
>
> What sort of sampling do you want to do?
>
> thanks
>>
>>
>> On Mon, Aug 27, 2018 at 11:16 AM, Naveen Dabas <naveen@paymonk.com
>> <mailto:naveen@paymonk.com>> wrote:
>>
>> Thanks for the help.
>> But now i'm getting some different error as i rum this command
>> ./pg_sample -a -f file.sql --limit="user = 100" --schema=dbname -h
>> hostname -U user -W password
>>
>> I am not getting output and one file opens , in that file there id
>> guide for pg_sample
>> ----
>> /tmp/9REOT5C
>>
>> NAME
>> pg_sample - extract a small, sample dataset from a larger PostgreSQL
>> database while maintaining referential integrity.
>> =head1 SYNOPSIS
>> pg_sample [ option... ] [ dbname ]
>> =head1 DESCRIPTION
>> pg_sample is a utility for exporting a small, sample dataset from a
>> larger PostgreSQL database. The output and command-line options
>> closely
>> resemble the pg_dump backup utility (although only the plain-text
>> format
>> is supported).
>> The sample database produced includes all tables from the original,
>> maintains referential integrity, and supports circular dependencies.
>> To build an actual instance of the sample database, the output of
>> this script
>> can be piped to the psql utility. For example, assuming we have an
>> existing
>> PostgreSQL database named "mydb", a sample database could be
>> constructed with:
>> createdb sampledb
>> pg_sample mydb | psql sampledb
>> and so on .......
>>
>> On Mon, Aug 27, 2018 at 1:27 AM, Paul Carlucci
>> <paul.carlucci@gmail.com <mailto:paul.carlucci@gmail.com>> wrote:
>>
>> sudo yum install perl-CPAN
>>
>> Also do a "yum search perl-" and you should find most, if not
>> all what you need natively packaged for your particular Linux
>> distro. You're better off just sticking with the pre-packaged
>> perl modules unless you specifically need something special.
>>
>> You'll find more modules if you also enable the EPEL yum repo by
>> setting enabled=1 in the first section of
>> /etc/yum.repos.d/epel.conf and rerunning that yum search command.
>>
>> On Sun, Aug 26, 2018, 2:20 PM Naveen Dabas <naveen@paymonk.com
>> <mailto:naveen@paymonk.com>> wrote:
>>
>> Sir i'm getting error in both commands
>>
>> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install Bundle::DBI'
>> Can't locate CPAN.pm in @INC (@INC contains:
>> /usr/local/lib64/perl5 /usr/local/share/perl5
>> /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
>> /usr/lib64/perl5 /usr/share/perl5 .).
>> BEGIN failed--compilation aborted.
>> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install DBD::Pg'
>> Can't locate CPAN.pm in @INC (@INC contains:
>> /usr/local/lib64/perl5 /usr/local/share/perl5
>> /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
>> /usr/lib64/perl5 /usr/share/perl5 .).
>> BEGIN failed--compilation aborted.
>>
>>
>>
>> operating system =CentOS Linux release 7.5.1804 (Core)
>>
>> thanks
>>
>>
>> On Fri, Aug 24, 2018 at 6:16 PM, Abhinav Mehta
>> <abhinav@metarain.com <mailto:abhinav@metarain.com>> wrote:
>>
>> Solution, execute this on your linux terminal -
>>
>> $ perl -MCPAN -e 'install Bundle::DBI'
>> $ perl -MCPAN -e 'install DBD::Pg'
>>
>> > On 24-Aug-2018, at 6:13 PM, Ravi Krishna
>> <sravikrishna@aol.com <mailto:sravikrishna@aol.com>>
>> wrote:
>> >
>> >>
>> >> sir have taken pg_sample
>> >> Now i want to run pg_sample with credential but i'm
>> getting this error
>> >>
>> >> Can't locate DBI.pm in @INC (@INC contains:
>> /usr/local/lib64/perl5 /usr/local/share/perl5
>> /usr/lib64/perl5/vendor_perl
>> /usr/share/perl5/vendor_perl /usr/lib64/perl5
>> /usr/share/perl5 .) at ./pg_sample line 192.
>> >> BEGIN failed--compilation aborted at ./pg_sample
>> line 192.
>> >
>> > As is clear from the message, you need to install
>> Perl DBI/DBD first.
>> >
>> >
>>
>>
>>
>>
>> -- --
>> With Regards
>> Naveen Dabas
>> Ph. 9017298370
>>
>>
>> *Important Disclaimer:* Information contained in this email
>> is for the recipient primarily addressed to. If you are not
>> the primary recipient or are not supposed to receive this
>> email, you are advised to kindly delete the email or the
>> thread and notify of the error. The logo is a registered and
>> copyrighted property of *ACTAS TECHNOLOGIES PRIVATE
>> LIMITED*. Do not use it without authorization.
>>
>>
>>
>>
>> -- --
>> With Regards
>> Naveen Dabas
>> Ph. 9017298370
>>
>>
>>
>>
>> --
>> --
>> With Regards
>> Naveen Dabas
>> Ph. 9017298370
>>
>>
>> *Important Disclaimer:* Information contained in this email is for the
>> recipient primarily addressed to. If you are not the primary recipient or
>> are not supposed to receive this email, you are advised to kindly delete
>> the email or the thread and notify of the error. The logo is a registered
>> and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not
>> use it without authorization.
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
--
--
With Regards
Naveen Dabas
Ph. 9017298370
--
*Important Disclaimer:* Information contained in this email is for the
recipient primarily addressed to. If you are not the primary recipient or
are not supposed to receive this email, you are advised to kindly delete
the email or the thread and notify of the error. The logo is a registered
and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not
use it without authorization.
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-26 19:57 ` Re: pg_sample Paul Carlucci <paul.carlucci@gmail.com>
2018-08-27 06:03 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-27 14:12 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-27 15:33 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
@ 2018-08-28 00:09 ` Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 25+ messages in thread
From: Adrian Klaver @ 2018-08-28 00:09 UTC (permalink / raw)
To: Naveen Dabas <naveen@paymonk.com>; +Cc: Paul Carlucci <paul.carlucci@gmail.com>; Abhinav Mehta <abhinav@metarain.com>; Ravi Krishna <sravikrishna@aol.com>; pgsql-general
On 08/27/2018 08:33 AM, Naveen Dabas wrote:
> actually i want limited data from the postgres database. But i don't
> want to use .csv
Does the sample need to include parent/child relationships?
In Postgres 9.5+ there is TABLESAMPLE:
https://www.postgresql.org/docs/10/static/sql-select.html
So you can do something like:
select * from plant1 TABLESAMPLE system (25);
on a single table.
I could see doing the above in a program and INSERTing the output to
another database.
>
>
>
> thanks
>
> On Mon, Aug 27, 2018 at 7:42 PM, Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
>
> On 08/26/2018 11:03 PM, Naveen Dabas wrote:
>
> Server encoding is UTF8
> Client encoding is UTF8
> Creating sample schema sampledb1
> DBD::Pg::db do failed: ERROR: cannot execute CREATE SCHEMA in a
> read-only transaction at ./pg_sample line 296.
> main::__ANON__('DBD::Pg::db do failed: ERROR: cannot execute
> CREATE SCHEMA i...', 'DBI::db=HASH(0xab2388)', undef) called at
> ./pg_sample line 478
> Done.
>
>
> can you help me in this
>
>
> Yes, by suggesting you try something other then pg_sample. The last
> commit was 4 years ago and it does not seem to be up to date enough.
>
> What sort of sampling do you want to do?
>
> thanks
>
>
> On Mon, Aug 27, 2018 at 11:16 AM, Naveen Dabas
> <naveen@paymonk.com <mailto:naveen@paymonk.com>
> <mailto:naveen@paymonk.com <mailto:naveen@paymonk.com>>> wrote:
>
> Thanks for the help.
> But now i'm getting some different error as i rum this command
> ./pg_sample -a -f file.sql --limit="user = 100"
> --schema=dbname -h
> hostname -U user -W password
>
> I am not getting output and one file opens , in that file
> there id
> guide for pg_sample
> ----
> /tmp/9REOT5C
>
> NAME
> pg_sample - extract a small, sample dataset from a larger
> PostgreSQL
> database while maintaining referential integrity.
> =head1 SYNOPSIS
> pg_sample [ option... ] [ dbname ]
> =head1 DESCRIPTION
> pg_sample is a utility for exporting a small, sample
> dataset from a
> larger PostgreSQL database. The output and command-line
> options closely
> resemble the pg_dump backup utility (although only the
> plain-text format
> is supported).
> The sample database produced includes all tables from the
> original,
> maintains referential integrity, and supports circular
> dependencies.
> To build an actual instance of the sample database, the
> output of
> this script
> can be piped to the psql utility. For example, assuming we
> have an
> existing
> PostgreSQL database named "mydb", a sample database could be
> constructed with:
> createdb sampledb
> pg_sample mydb | psql sampledb
> and so on .......
>
> On Mon, Aug 27, 2018 at 1:27 AM, Paul Carlucci
> <paul.carlucci@gmail.com <mailto:paul.carlucci@gmail.com>
> <mailto:paul.carlucci@gmail.com
> <mailto:paul.carlucci@gmail.com>>> wrote:
>
> sudo yum install perl-CPAN
>
> Also do a "yum search perl-" and you should find most,
> if not
> all what you need natively packaged for your particular
> Linux
> distro. You're better off just sticking with the
> pre-packaged
> perl modules unless you specifically need something
> special.
>
> You'll find more modules if you also enable the EPEL
> yum repo by
> setting enabled=1 in the first section of
> /etc/yum.repos.d/epel.conf and rerunning that yum
> search command.
>
> On Sun, Aug 26, 2018, 2:20 PM Naveen Dabas
> <naveen@paymonk.com <mailto:naveen@paymonk.com>
> <mailto:naveen@paymonk.com
> <mailto:naveen@paymonk.com>>> wrote:
>
> Sir i'm getting error in both commands
>
> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install
> Bundle::DBI'
> Can't locate CPAN.pm in @INC (@INC contains:
> /usr/local/lib64/perl5 /usr/local/share/perl5
> /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl
> /usr/lib64/perl5 /usr/share/perl5 .).
> BEGIN failed--compilation aborted.
> [root@ip-88-8-8-17 ~]# perl -MCPAN -e 'install DBD::Pg'
> Can't locate CPAN.pm in @INC (@INC contains:
> /usr/local/lib64/perl5 /usr/local/share/perl5
> /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl
> /usr/lib64/perl5 /usr/share/perl5 .).
> BEGIN failed--compilation aborted.
>
>
>
> operating system =CentOS Linux release 7.5.1804 (Core)
>
> thanks
>
>
> On Fri, Aug 24, 2018 at 6:16 PM, Abhinav Mehta
> <abhinav@metarain.com <mailto:abhinav@metarain.com>
> <mailto:abhinav@metarain.com <mailto:abhinav@metarain.com>>> wrote:
>
> Solution, execute this on your linux terminal -
>
> $ perl -MCPAN -e 'install Bundle::DBI'
> $ perl -MCPAN -e 'install DBD::Pg'
>
> > On 24-Aug-2018, at 6:13 PM, Ravi Krishna
> <sravikrishna@aol.com
> <mailto:sravikrishna@aol.com> <mailto:sravikrishna@aol.com
> <mailto:sravikrishna@aol.com>>> wrote:
> >
> >>
> >> sir have taken pg_sample
> >> Now i want to run pg_sample with credential
> but i'm
> getting this error
> >>
> >> Can't locate DBI.pm in @INC (@INC contains:
> /usr/local/lib64/perl5 /usr/local/share/perl5
> /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5
> /usr/share/perl5 .) at ./pg_sample line 192.
> >> BEGIN failed--compilation aborted at
> ./pg_sample
> line 192.
> >
> > As is clear from the message, you need to
> install
> Perl DBI/DBD first.
> >
> >
>
>
>
>
> -- --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
> *Important Disclaimer:* Information contained in
> this email
> is for the recipient primarily addressed to. If you
> are not
> the primary recipient or are not supposed to
> receive this
> email, you are advised to kindly delete the email
> or the
> thread and notify of the error. The logo is a
> registered and
> copyrighted property of *ACTAS TECHNOLOGIES PRIVATE
> LIMITED*. Do not use it without authorization.
>
>
>
>
> -- --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
>
>
> --
> --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
> *Important Disclaimer:* Information contained in this email is
> for the recipient primarily addressed to. If you are not the
> primary recipient or are not supposed to receive this email, you
> are advised to kindly delete the email or the thread and notify
> of the error. The logo is a registered and copyrighted property
> of *ACTAS TECHNOLOGIES PRIVATE LIMITED*. Do not use it without
> authorization.
>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>
>
>
> --
> --
> With Regards
> Naveen Dabas
> Ph. 9017298370
>
>
> *Important Disclaimer:* Information contained in this email is for the
> recipient primarily addressed to. If you are not the primary recipient
> or are not supposed to receive this email, you are advised to kindly
> delete the email or the thread and notify of the error. The logo is a
> registered and copyrighted property of *ACTAS TECHNOLOGIES PRIVATE
> LIMITED*. Do not use it without authorization.
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: pg_sample
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2018-08-23 07:10 ` Re: pg_sample naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:52 ` Re: pg_sample Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Re: pg_sample Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Re: pg_sample Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
2018-08-26 19:57 ` Re: pg_sample Paul Carlucci <paul.carlucci@gmail.com>
2018-08-27 06:03 ` Re: pg_sample Naveen Dabas <naveen@paymonk.com>
@ 2018-08-29 12:23 ` Daniel Verite <daniel@manitou-mail.org>
1 sibling, 0 replies; 25+ messages in thread
From: Daniel Verite @ 2018-08-29 12:23 UTC (permalink / raw)
To: Naveen Dabas <naveen@paymonk.com>; +Cc: Paul Carlucci <paul.carlucci@gmail.com>; Abhinav Mehta <abhinav@metarain.com>; Ravi Krishna <sravikrishna@aol.com>; Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
Naveen Dabas wrote:
> Creating sample schema sampledb1
> DBD::Pg::db do failed: ERROR: cannot execute CREATE SCHEMA in a read-only
> transaction at ./pg_sample line 296.
Maybe you ran this on a hot standby? It can't work because
this program needs to write data into the database,
which is not allowed outside of the primary node.
Or you may have default_transaction_read_only set to true
for the particular db/user of the connection.
https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-RE...
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite
^ permalink raw reply [nested|flat] 25+ messages in thread
end of thread, other threads:[~2018-08-29 12:23 UTC | newest]
Thread overview: 25+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 00:24 pg_sample Patrick B <patrickbakerbr@gmail.com>
2016-10-19 00:39 ` Michael Paquier <michael.paquier@gmail.com>
2016-10-19 01:30 ` Patrick B <patrickbakerbr@gmail.com>
2016-10-19 02:21 ` Adrian Klaver <adrian.klaver@aklaver.com>
2016-10-19 02:39 ` Melvin Davidson <melvin6925@gmail.com>
2016-10-19 02:58 ` Greg Sabino Mullane <greg@turnstep.com>
2016-10-19 03:15 ` Charles Clavadetscher <clavadetscher@swisspug.org>
2016-10-19 04:05 ` Adrian Klaver <adrian.klaver@aklaver.com>
2016-10-19 18:03 ` Greg Sabino Mullane <greg@turnstep.com>
2016-10-19 09:32 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
2018-08-23 07:10 ` naveen12 <naveen@paymonk.com>
2018-08-23 13:04 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:39 ` Naveen Dabas <naveen@paymonk.com>
2018-08-23 14:47 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-23 14:52 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-24 10:38 ` Naveen Dabas <naveen@paymonk.com>
2018-08-24 12:43 ` Ravi Krishna <sravikrishna@aol.com>
2018-08-24 12:46 ` Abhinav Mehta <abhinav@metarain.com>
2018-08-25 05:44 ` Naveen Dabas <naveen@paymonk.com>
2018-08-26 19:57 ` Paul Carlucci <paul.carlucci@gmail.com>
2018-08-27 06:03 ` Naveen Dabas <naveen@paymonk.com>
2018-08-27 14:12 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-27 15:33 ` Naveen Dabas <naveen@paymonk.com>
2018-08-28 00:09 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-29 12:23 ` Daniel Verite <daniel@manitou-mail.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox