Re: [GENERAL] Avoiding deadlocks when performing bulk update and delete operations

2014-11-24 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sanjaya Vithanagama Sent: Sunday, November 23, 2014 10:52 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Avoiding deadlocks when performing bulk update and delete operations Hi All, We ha

[GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Berend Tober
Is there a good way to individually list the DDL for all individual data base objects? Running a data base dump like: pg_dump mydatabase > mydatabase-database.sql produces one big file with all the DDL and DML to restore the data base, which is very convenient for most cases. Using that I

Re: [GENERAL] How to avoid a GIN recheck condition

2014-11-24 Thread Tom Lane
Alexis writes: > I have a GIN index but the planner rechecks the condition. When many rows > are foud in the index that is very slow: You're assuming a fact not in evidence, namely that the recheck condition is being used at runtime. The planner will *always* attach a recheck condition to a bitm

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread François Beausoleil
Le 2014-11-24 à 10:14, Berend Tober a écrit : > Is there a good way to individually list the DDL for all individual data base > objects? > > grep -v '^;' listfile | while read a b c n >do > a=${a/;} > echo $a > f > pg_restore -L f -f outputdir/$a dumpfile >done > > T

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Alvaro Herrera
Berend Tober wrote: > Is there a good way to individually list the DDL for all individual data > base objects? These threads might interest you: http://www.postgresql.org/message-id/AANLkTikLHA2x6U=q-t0j0ys78txhfmdtyxjfsrsrc...@mail.gmail.com http://www.postgresql.org/message-id/caaswcxdkroy2uhlo

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Berend Tober
François Beausoleil wrote: Le 2014-11-24 à 10:14, Berend Tober a écrit : Is there a good way to individually list the DDL for all individual data base objects? Were you aware that pg_restore can restore to STDOUT, and output DDL for only a single named object from a custom dump file?

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Melvin Davidson
You should probably look at the pg_extractor utility. https://github.com/omniti-labs/pg_extractor With it, you can dump individual or selected objects to separate directories. On Mon, Nov 24, 2014 at 11:00 AM, Alvaro Herrera wrote: > Berend Tober wrote: > > Is there a good way to individually

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Adrian Klaver
On 11/24/2014 08:12 AM, Berend Tober wrote: François Beausoleil wrote: Le 2014-11-24 à 10:14, Berend Tober a écrit : Is there a good way to individually list the DDL for all individual data base objects? Were you aware that pg_restore can restore to STDOUT, and output DDL for only a si

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Berend Tober
Adrian Klaver wrote: On 11/24/2014 08:12 AM, Berend Tober wrote: François Beausoleil wrote: Le 2014-11-24 à 10:14, Berend Tober a écrit : Is there a good way to individually list the DDL for all individual data base objects? Were you aware that pg_restore can restore to STDOUT, and ou

Re: [GENERAL] How to individually list the DDL for all individual data base objects

2014-11-24 Thread Berend Tober
Melvin Davidson wrote: You should probably look at the pg_extractor utility. https://github.com/omniti-labs/pg_extractor With it, you can dump individual or selected objects to separate directories. That looks like what I'm looking for. (Note: I did Google searching, but apparently did not

Re: [GENERAL] Avoiding deadlocks when performing bulk update and delete operations

2014-11-24 Thread Bill Moran
On Mon, 24 Nov 2014 14:51:42 +1100 Sanjaya Vithanagama wrote: > Hi All, > > We have a single table which does not have any foreign key references. > > id_A (bigint) > id_B (bigint) > val_1 (varchar) > val_2 (varchar) > > The primary key of the table is a composite of id_A and id_B. > > Reads