Re: [GENERAL] xlog min recovery request is past current point -- is it real problem?

2014-09-07 Thread Michael Paquier
On Mon, Sep 8, 2014 at 7:21 AM, Sergey Burladyan wrote: > Hello, All! > > I get this messages from new standby: > 2014-09-06 00:30:05 MSK pid=36409,user=,db=,host= LOG: restored log file > "000A0001213C00B1" from archive > 2014-09-06 00:30:05 MSK pid=36447,user=,db=,host= WARNING: xlog

Re: [GENERAL] Decreasing performance in table partitioning

2014-09-07 Thread Huang, Suya
Instead of deleting from the original non-partition table which is not efficient, you can try below approach. Put below logic in a function as you like: Create a new partition table. Insert data from original non-partition table to the correct partition of new partition table. Build index and a

Re: [GENERAL] psql and tab-delimited output

2014-09-07 Thread Melvin Davidson
>the output I'd prefer is: > id fld_1 > 1 test\tvalue > 2 test\tvalue > 3 >test\tvalue *Does this work for you?copy (SELECT id, replace(fld_1, '', '\t') FROM tsv_test) to stdout with csv header delimiter '';query returned copy data:idreplace1test\tvalue2test\tvalue3

[GENERAL] xlog min recovery request is past current point -- is it real problem?

2014-09-07 Thread Sergey Burladyan
Hello, All! I get this messages from new standby: 2014-09-06 00:30:05 MSK pid=36409,user=,db=,host= LOG: restored log file "000A0001213C00B1" from archive 2014-09-06 00:30:05 MSK pid=36447,user=,db=,host= WARNING: xlog min recovery request 12149/A5149BA0 is past current point 1213C/B16

Re: [GENERAL] Querying a time range across multiple partitions

2014-09-07 Thread John R Pierce
On 9/7/2014 12:55 PM, Jeff Janes wrote: On Fri, Sep 5, 2014 at 2:17 PM, John R Pierce > wrote: On 9/5/2014 10:31 AM, Cal Heldenbrand wrote: Number of child tables: 1581 that's an insane number of children.We try and limit it to 50 or so child ta

Re: [GENERAL] Querying a time range across multiple partitions

2014-09-07 Thread Jeff Janes
On Fri, Sep 5, 2014 at 2:17 PM, John R Pierce wrote: > On 9/5/2014 10:31 AM, Cal Heldenbrand wrote: > > Number of child tables: 1581 > > > that's an insane number of children.We try and limit it to 50 or so > child tables, for instance, 6 months retention by week, of data will > millions of

Re: [GENERAL] Querying a time range across multiple partitions

2014-09-07 Thread Jeff Janes
On Fri, Sep 5, 2014 at 10:31 AM, Cal Heldenbrand wrote: > > explain analyze select time,event from logins > where username='bob' and hash='1234' and time > current_date - interval > '1 week'; > > Result (cost=0.00..765.11 rows=1582 width=14) >-> Append (cost=0.00..765.11 rows=1582 width

Re: [GENERAL] psql and tab-delimited output

2014-09-07 Thread Jeff Janes
On Sat, Sep 6, 2014 at 12:32 AM, Abelard Hoffman wrote: > Hi. > > Traditionally, to generate a TSV report, I've simply invoked psql with: > --no-align --field-separator '\t' --pset footer=off > > That works in most cases, except when your column values contain tabs > themselves. > > I know that C

Re: [GENERAL] Decreasing performance in table partitioning

2014-09-07 Thread Tom Lane
Herouth Maoz writes: > My problem is the main loop, in which data for one month is moved from the > old table to the partition table. > EXECUTE FORMAT ( > 'WITH del AS ( > DELETE FROM %1$I.%2$I > WHERE %3$I >= %4$L AND %3$I <

Re: [GENERAL] psql and tab-delimited output

2014-09-07 Thread Adrian Klaver
On 09/07/2014 01:45 AM, Abelard Hoffman wrote: On Sat, Sep 6, 2014 at 11:43 AM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 09/06/2014 10:34 AM, Abelard Hoffman wrote: On Sat, Sep 6, 2014 at 7:28 AM, Adrian Klaver mailto:adrian.kla...@aklaver.com> <

[GENERAL] Decreasing performance in table partitioning

2014-09-07 Thread Herouth Maoz
Hello all. I have created a function that partitions a large table into monthly partitions. Since the name of the table, target schema for partitions, name of the date field etc. are all passed as strings, the function is heavily based on EXECUTE statements. My problem is the main loop, in wh

Re: [GENERAL] psql and tab-delimited output

2014-09-07 Thread David G Johnston
Alban Hertroys-4 wrote > On 07 Sep 2014, at 10:45, Abelard Hoffman < > abelardhoffman@ > > wrote: > >> For reports, everyone else mostly uses other tools? I'd like to stay away >> from GUI-tools, if possible. > > For reporting, usually you use the data in the database directly. > > A TSV or CS

Re: [GENERAL] psql and tab-delimited output

2014-09-07 Thread Alban Hertroys
On 07 Sep 2014, at 10:45, Abelard Hoffman wrote: > For reports, everyone else mostly uses other tools? I'd like to stay away > from GUI-tools, if possible. For reporting, usually you use the data in the database directly. A TSV or CSV file is not a report, it’s at best a data source for your r

Re: [GENERAL] psql and tab-delimited output

2014-09-07 Thread Abelard Hoffman
On Sat, Sep 6, 2014 at 11:43 AM, Adrian Klaver wrote: > On 09/06/2014 10:34 AM, Abelard Hoffman wrote: > >> On Sat, Sep 6, 2014 at 7:28 AM, Adrian Klaver > > wrote: >> >> On 09/06/2014 12:32 AM, Abelard Hoffman wrote: >> >> [snip] >> >> So, my questio