Re: [GENERAL] BDR, wal segment has been removed, is it possible move forward?

2017-09-07 Thread Craig Ringer
On 7 September 2017 at 21:16, milist ujang wrote: > Hi Craig, > > On Wed, Sep 6, 2017 at 4:07 PM, Craig Ringer > wrote: > >> >> You could drop and re-create the replication slot, I guess. But your >> nodes would be hopelessly out of sync and need

[GENERAL] B-tree index on a VARCHAR(4000) column

2017-09-07 Thread Ron Johnson
Hi, v 9.2.7 Based on LENGTH(offending_column), none of the values are more than 144 bytes in this 44.2M row table. Even though VARCHAR is, by definition, variable length, are there any internal design issues which would make things more efficient if it were dropped to, for example,

Re: [GENERAL] pg_rewind issue

2017-09-07 Thread Michael Paquier
On Thu, Sep 7, 2017 at 9:06 PM, James Sewell wrote: > A client has have been having problems with pg_rewind. > > They have two PostgreSQL (Oracle Enterprise Linux 7, 9.6.4) nodes in > streaming replication and follow these steps: > > 1. Stop the master > 2. Promote the

Re: [GENERAL] Performance with high correlation in group by on PK

2017-09-07 Thread Jeff Janes
On Tue, Aug 29, 2017 at 1:20 AM, Alban Hertroys wrote: > On 28 August 2017 at 21:32, Jeff Janes wrote: > > On Mon, Aug 28, 2017 at 5:22 AM, Alban Hertroys > wrote: > >> > >> Hi all, > >> > >> It's been a while since I actually got

Re: [GENERAL] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Ron Johnson
On 09/07/2017 05:07 PM, Michael Paquier wrote: On Thu, Sep 7, 2017 at 11:08 PM, Tom Lane wrote: Manual cleanup shouldn't be very hard, fortunately. Run pg_controldata to see where the last checkpoint is, and delete WAL files whose names indicate they are before that (but

Re: [GENERAL] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Michael Paquier
On Thu, Sep 7, 2017 at 11:08 PM, Tom Lane wrote: > Manual cleanup shouldn't be very hard, fortunately. Run pg_controldata > to see where the last checkpoint is, and delete WAL files whose names > indicate they are before that (but not the one including the checkpoint!). > If

Re: [GENERAL] column names query

2017-09-07 Thread John R Pierce
On 9/7/2017 12:18 AM, haman...@t-online.de wrote: is there a simple way to retrieve column names from a query - basically the way psql adds column headings when I do a select? if you're using libpq to do your queries, PQfname(*result, column_number) returns the name of that column number.

Re: [GENERAL] Confused about max_standby_streaming_delay

2017-09-07 Thread Jeff Janes
On Thu, Sep 7, 2017 at 1:16 AM, Robert Inder wrote: > > > On 6 September 2017 at 20:47, Jeff Janes wrote: > >> >>> Have I misunderstood something? Or is Postgres not actually configured >>> the way I think it is? >>> >> >> The standby will wait

Re: [GENERAL] column names query

2017-09-07 Thread Francisco Olarte
Hi Hamman: On Thu, Sep 7, 2017 at 3:17 PM, wrote: > I would like to do something like > \copy (select heading(select my query here)) to /tmp/heading_testfile1 It's already been pointed out, you can do something using CSV copy with headers ( Why headers are not

Re: [GENERAL] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Tom Lane
Ron Johnson writes: > On 09/07/2017 09:08 AM, Tom Lane wrote: >> Manual cleanup shouldn't be very hard, fortunately. Run pg_controldata >> to see where the last checkpoint is, and delete WAL files whose names >> indicate they are before that (but not the one including the

Re: [GENERAL] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Ron Johnson
On 09/07/2017 09:08 AM, Tom Lane wrote: Ron Johnson writes: After disabling log shipping via setting "archive_mode = off", and then running, "pg_ctl reload", old WAL files and their associated .ready files aren't being deleted. Hmm. I might be misremembering, but I

Re: [GENERAL] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Tom Lane
Ron Johnson writes: > After disabling log shipping via setting "archive_mode = off", and then > running, "pg_ctl reload", old WAL files and their associated .ready files > aren't being deleted. Hmm. I might be misremembering, but I think that it's the archiver process

[GENERAL] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Ron Johnson
Hi, v8.4 (and there's nothing I can do about it). After disabling log shipping via setting "archive_mode = off", and then running, "pg_ctl reload", old WAL files and their associated .ready files aren't being deleted. Is there any document you can point me to as to why this is happening,

Re: [GENERAL] column names query

2017-09-07 Thread Manuel Gómez
On Thu, Sep 7, 2017 at 3:28 PM wrote: > Example query > select a.col1, case when a.col2 > 0 then a.col3 else b.xcol1 end as mycol3 > from a left join b on > Expected response > col1 mycol3 > This may be overkill, but works: postgres=# \copy (select 1 as foo, 2 as bar

Re: [GENERAL] column names query

2017-09-07 Thread hamann . w
>> SELECT table_name, column_name >> FROM information_schema.columns >> WHERE table_name = 'your_name'; >> >> - Original Message -From: hamann w To: >> pgsql-general@postgresql.orgSent: Thu, 07 Sep 2017 07:18:12 - >> (UTC)Subject: [GENERAL] column names query

Re: [GENERAL] column names query

2017-09-07 Thread hamann . w
>> On Thu, Sep 7, 2017 at 9:18 AM, wrote: >> > is there a simple way to retrieve column names from a query - basically >> > the way psql adds >> > column headings when I do a select? >> >> How do you do the query? I mean, JDBC, PERL? After all psql is just a >> C

Re: [GENERAL] BDR, wal segment has been removed, is it possible move forward?

2017-09-07 Thread milist ujang
Hi Craig, On Wed, Sep 6, 2017 at 4:07 PM, Craig Ringer wrote: > > You could drop and re-create the replication slot, I guess. But your nodes > would be hopelessly out of sync and need manual resync (with data > replication disabled) of one node vs another. > Thanks for

Re: [GENERAL] column names query

2017-09-07 Thread stimits
SELECT table_name, column_name FROM information_schema.columns WHERE table_name = 'your_name'; - Original Message -From: hamann w To: pgsql-general@postgresql.orgSent: Thu, 07 Sep 2017 07:18:12 - (UTC)Subject: [GENERAL] column names query Hi, is there a

[GENERAL] Plans to lift no write limitation on parallelism?

2017-09-07 Thread Alexander Stoddard
The documentation for 9.6 suggests the future possibility of lifting the limitation on parallel query where it cannot be used in a query that writes data. Is lifting this limitation on the roadmap? https://www.postgresql.org/docs/current/static/when-can-parallel-query-be-used.html Thank you,

[GENERAL] pg_rewind issue

2017-09-07 Thread James Sewell
Hi, A client has have been having problems with pg_rewind. They have two PostgreSQL (Oracle Enterprise Linux 7, 9.6.4) nodes in streaming replication and follow these steps: 1. Stop the master 2. Promote the standby 3. After successful failover wait some time (a lot of data is written) 4.

Re: [GENERAL] Confused about max_standby_streaming_delay

2017-09-07 Thread Robert Inder
On 6 September 2017 at 20:47, Jeff Janes wrote: > >> Have I misunderstood something? Or is Postgres not actually configured >> the way I think it is? >> > > The standby will wait for ten minutes to obtain the lock it wishes to > obtain. In 9.4, if something other than

Re: [GENERAL] column names query

2017-09-07 Thread Francisco Olarte
On Thu, Sep 7, 2017 at 9:18 AM, wrote: > is there a simple way to retrieve column names from a query - basically the > way psql adds > column headings when I do a select? How do you do the query? I mean, JDBC, PERL? After all psql is just a C program doing a query using

[GENERAL] column names query

2017-09-07 Thread hamann . w
Hi, is there a simple way to retrieve column names from a query - basically the way psql adds column headings when I do a select? Best regards Wolfgang Hamann -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: