Re: [GENERAL] Question regarding logical replication

2017-10-27 Thread Weiping Qu
Thanks, Francisco. From the plots we got the same feeling, cache reads with little lags and high cache hits really don't put extra burden on the original write throughput for OLTP transactions. And log-based is the most efficient and harm-less one as compared to trigger-based and timestamp

Re: [GENERAL] Question regarding logical replication

2017-10-27 Thread Francisco Olarte
On Fri, Oct 27, 2017 at 12:04 PM, Weiping Qu wrote: > That's a good point and we haven't accounted for disk caching. > Is there any way to confirm this fact in PostgreSQL? I doubt, as it names indicates cache should be hidden from the db server. You could monitor the

Re: [GENERAL] Question regarding logical replication

2017-10-27 Thread Weiping Qu
That's a good point and we haven't accounted for disk caching. Is there any way to confirm this fact in PostgreSQL? Weiping On 27.10.2017 11:53, Francisco Olarte wrote: On Thu, Oct 26, 2017 at 10:20 PM, Weiping Qu wrote: However, the plots showed different trend

Re: [GENERAL] Question regarding logical replication

2017-10-27 Thread Francisco Olarte
On Thu, Oct 26, 2017 at 10:20 PM, Weiping Qu wrote: > However, the plots showed different trend (currently I don't have plots on > my laptop) which shows that the more frequently are the CDC processes > reading from logical slots, the less overhead is incurred over

Re: [GENERAL] Question regarding logical replication

2017-10-26 Thread Weiping Qu
;PostgreSql-general" <pgsql-general@postgresql.org> Sent: Thursday, 26 October, 2017 14:07:54 Subject: [GENERAL] Question regarding logical replication Dear postgresql community, I have a question regarding understanding the implementation logic behind logical replication. Assume a replicat

Re: [GENERAL] Question regarding logical replication

2017-10-26 Thread Alvaro Aguayo Garcia-Rada
Sent: Thursday, 26 October, 2017 14:07:54 Subject: [GENERAL] Question regarding logical replication Dear postgresql community, I have a question regarding understanding the implementation logic behind logical replication. Assume a replication slot created on the master node, will more and

[GENERAL] Question regarding logical replication

2017-10-26 Thread Weiping Qu
Dear postgresql community, I have a question regarding understanding the implementation logic behind logical replication. Assume a replication slot created on the master node, will more and more data get piled up in the slot and the size of replication slot continuously increase if there is

[GENERAL] Question about memory usage of pg_dump

2017-10-09 Thread Condor
Hello, I have a question .. okay I know it's a dump but need to ask it because probably I will need to tell of five of my collective bad things... :) My version is PostgreSQL 9.6.5 on x86_64-slackware-linux-gnu, compiled by x86_64-slackware-linux-gcc (GCC) 7.2.0, 64-bit on server IP

Re: [GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Miloslav Semler
Thank you very much. You have been right. Adding tramecky_id IS NOT NULL solved the problem. Cheers, Miloslav Dne 22.9.2017 v 09:32 Albe Laurenz napsal(a): Miloslav Semler wrote: I found strange behavior with subselects and I am not able to explain it. I have several tables in schema:

[GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Miloslav Semler
Hello, I found strange behavior with subselects and I am not able to explain it. I have several tables in schema: tramecky, mt_hodnoty, plata_kusy in these tables, id is always primary key (serial), table_id is always foreign key to table. When I run this query: select tramecky.id FROM

Re: [GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Albe Laurenz
Miloslav Semler wrote: > I found strange behavior with subselects and I am not able to explain > it. I have several tables in schema: > > tramecky, mt_hodnoty, plata_kusy > > in these tables, id is always primary key (serial), table_id is always > foreign key to table. When I run this query: >

[GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Miloslav Semler
Hello, I found strange behavior with subselects and I am not able to explain it. I have several tables in schema: tramecky, mt_hodnoty, plata_kusy in these tables, id is always primary key (serial), table_id is always foreign key to table. When I run this query: select tramecky.id FROM

Re: [GENERAL] Question about loading up a table

2017-08-02 Thread Alex Samad
Hi I don't have an extra 4T of filespace. I could potentially move the attached lun from one server and attach to the other well that was my question how to check if its pg_dump thats bound. I have checked network performance - 9.8Gb and I can write more data to disk I do have 1 index A On

Re: [GENERAL] Question about loading up a table

2017-08-02 Thread Scott Marlowe
On Tue, Aug 1, 2017 at 4:27 PM, Alex Samad wrote: > Hi > > So just to go over what i have > > > server A (this is the original pgsql server 9.2) > > Server X and Server Y ... PGSQL 9.6 in a cluster - streaming replication > with hot standby. > > > I have 2 tables about 2.5T of

Re: [GENERAL] Question about loading up a table

2017-08-01 Thread Alex Samad
Hi So just to go over what i have server A (this is the original pgsql server 9.2) Server X and Server Y ... PGSQL 9.6 in a cluster - streaming replication with hot standby. I have 2 tables about 2.5T of diskspace. I want to get the date from A into X and X will replicate into Y. I am

Re: [GENERAL] Question about loading up a table

2017-08-01 Thread Scott Marlowe
On Mon, Jul 31, 2017 at 11:16 PM, Alex Samad wrote: > Hi > > I double checked and there is data going over, thought I would correct that. > > But it seems to be very slow. Having said that how do I / what tools do I > use to check through put Try the pg_current_xlog_location

Re: [GENERAL] Question about loading up a table

2017-08-01 Thread Alex Samad
Hi I double checked and there is data going over, thought I would correct that. But it seems to be very slow. Having said that how do I / what tools do I use to check through put A On 1 August 2017 at 08:56, Alex Samad wrote: > Hi > > I'm using pg_dump 9.6 to do the

Re: [GENERAL] Question about loading up a table

2017-07-31 Thread Alex Samad
Hi I'm using pg_dump 9.6 to do the dumps. I'm also pretty sure no data is being replicated until the end of the copy stdin as I was watching tcpdump output and I can see data from the orig master to the new master and no traffic between new master and the standby, pretty sure my replication is

Re: [GENERAL] Question about loading up a table

2017-07-31 Thread Scott Marlowe
On Mon, Jul 31, 2017 at 2:31 AM, vinny wrote: > On 2017-07-31 11:02, Alex Samad wrote: >> >> Hi >> >> I am using pg_dump | psql to transfer data from my old 9.2 psql into a >> 9.6 psql. Note that you should be doing pg_dump with 9.6's pg_dump, as it's possible for 9.2's pg_dump

Re: [GENERAL] Question about loading up a table

2017-07-31 Thread vinny
On 2017-07-31 11:02, Alex Samad wrote: Hi I am using pg_dump | psql to transfer data from my old 9.2 psql into a 9.6 psql. The new DB server is setup as master replicating to a hot standby server. What I have noticed is that the rows don't get replicated over until the copy from stdin is

[GENERAL] Question about loading up a table

2017-07-31 Thread Alex Samad
Hi I am using pg_dump | psql to transfer data from my old 9.2 psql into a 9.6 psql. The new DB server is setup as master replicating to a hot standby server. What I have noticed is that the rows don't get replicated over until the copy from stdin is finished... hard to test when you have M+

Re: [GENERAL] Question about paritioning

2017-07-27 Thread Alex Samad
so I have a pgsql function that will create tables based on MD for x years in advance and inherits of base table. with this CHECK (_received >= '2013-01-01 00:00:00+11'::timestamp with time zone AND _received < '2013-02-01 01:00:00+11'::timestamp with time zone) now for the insert, do I

Re: [GENERAL] Question about paritioning

2017-07-27 Thread John R Pierce
On 7/27/2017 12:43 AM, Alex Samad wrote: ... as long as the queries stay on a small amount of parts that we should be okay. thats true as long as the planner can restrict the queries to the correct partition... but there's lots of queries that end up having to hit all partitions because

Re: [GENERAL] Question about paritioning

2017-07-27 Thread Alex Samad
So is date_trunc better than to_char ? I'm thinking it probably is as for the number of partitions, well we don't plan on deleting anything, but from my reading as long as the queries stay on a small amount of parts that we should be okay. A On 27 July 2017 at 15:33, John R Pierce

Re: [GENERAL] Question about paritioning

2017-07-26 Thread John R Pierce
On 7/26/2017 10:08 PM, Alex Samad wrote: I have a large table about 3B rows, that I would like to partition on a column called _received which is of type timestamp a good goal is to have no more than about 100 partitions max, and ideally more like 25. when we partition on time stamp, we

[GENERAL] Question about paritioning

2017-07-26 Thread Alex Samad
Hi I have a large table about 3B rows, that I would like to partition on a column called _received which is of type timestamp I followed this https://medium.com/@StreamBright/creating-partitions-automatically-in-postgresql-7006d68c0fbb and came up with CREATE OR REPLACE FUNCTION

Re: [GENERAL] Question regarding pgsql-general mailing list.

2017-06-25 Thread Berend Tober
FYI, Postgresql caps for sale on ebay at http://www.ebay.com/itm/162564660418 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Question about jsonb and data structures

2017-06-21 Thread Paul Jones
On Wed, Jun 21, 2017 at 09:37:20AM -0700, Emilie Laffray wrote: > Date: Wed, 21 Jun 2017 09:37:20 -0700 > From: Emilie Laffray <emilie.laff...@gmail.com> > To: Achilleas Mantzios <ach...@matrix.gatewaynet.com> > Cc: pgsql-general@postgresql.org > Subject: Re: [GE

Re: [GENERAL] Question about jsonb and data structures

2017-06-21 Thread Emilie Laffray
Hello Achilleas, I fail to see how it would solve my problem here. I already have a structure that is packed and nested. Your example is on a simple key/value pair structure and effectively you can address the ids very simply. In my case, I would need to return only a subset of the json data.

Re: [GENERAL] Question about jsonb and data structures

2017-06-21 Thread Achilleas Mantzios
On 21/06/2017 01:01, Emilie Laffray wrote: Hello, I have been playing with Postgresql recently with a large table and I have started looking at reducing the number of rows in that table. One idea to reduce the actual size, I thought I would "compress" the data structure into a JSON object

[GENERAL] Question about jsonb and data structures

2017-06-20 Thread Emilie Laffray
Hello, I have been playing with Postgresql recently with a large table and I have started looking at reducing the number of rows in that table. One idea to reduce the actual size, I thought I would "compress" the data structure into a JSON object (more on that later). The table is pretty

Re: [GENERAL] Question regarding the output of postgresql *explain* command

2017-05-28 Thread Arup Rakshit
Hi Tom, Thanks, I’ll read this page. > On May 28, 2017, at 8:36 PM, Tom Lane wrote: > > Arup Rakshit writes: >> I was reading to day how indexing works. And I was trying some query, for >> example below one. What the range basically means

Re: [GENERAL] Question regarding the output of postgresql *explain* command

2017-05-28 Thread Tom Lane
Arup Rakshit writes: > I was reading to day how indexing works. And I was trying some query, for > example below one. What the range basically means (cost=0.28..8.30 ? I don’t > understand this. https://www.postgresql.org/docs/current/static/using-explain.html

[GENERAL] Question regarding the output of postgresql *explain* command

2017-05-28 Thread Arup Rakshit
Hi, I was reading to day how indexing works. And I was trying some query, for example below one. What the range basically means (cost=0.28..8.30 ? I don’t understand this. ——— arup@ror ~/part-time-projects/entrylvl (add_index_to_job_sources)$ rails db psql (9.5.0) Type "help" for

Re: [GENERAL] Question about TOAST table - PostgreSQL 9.2

2017-02-28 Thread Albe Laurenz
Patrick B wrote: > I have a database which is 4TB big. We currently store binary data in a bytea > data type column > (seg_data BYTEA). The column is behind binary_schema and the files types > stored are: pdf, jpg, png. > Questions: > > 1 - If I take out 500GB of bytea data ( by updating the

[GENERAL] Question about TOAST table - PostgreSQL 9.2

2017-02-27 Thread Patrick B
Hi all. I have a database which is 4TB big. We currently store binary data in a bytea data type column (seg_data BYTEA). The column is behind binary_schema and the files types stored are: pdf, jpg, png. *Getting the schema binary_schema size:* SELECT

Re: [GENERAL] Question slow query

2017-01-27 Thread Tom Lane
John R Pierce writes: > On 1/16/2017 11:27 AM, Patrick B wrote: >> CREATE INDEX CONCURRENTLY ON note (timezone('Etc/UTC'::text, d_date)); > why did you prefix your index with timezone('etc/UTC'::text ??? that > doesn't make sense to me at all. is timezone() some function

Re: [GENERAL] Question slow query

2017-01-27 Thread John R Pierce
On 1/16/2017 11:27 AM, Patrick B wrote: Sorry about that.. just wanted to understand how to index a timestamp column. I was able to do this way: CREATE INDEX CONCURRENTLY ON note (timezone('Etc/UTC'::text, d_date)); why did you prefix your index with timezone('etc/UTC'::text ???

Re: [GENERAL] Question slow query

2017-01-27 Thread Venkata B Nagothi
On Tue, Jan 17, 2017 at 6:27 AM, Patrick B wrote: > > > 2017-01-12 16:48 GMT+13:00 Andreas Joseph Krogh : > >> På torsdag 12. januar 2017 kl. 03:15:59, skrev Patrick B < >> patrickbake...@gmail.com>: >> >> Hi guys, >> >> I've got a slow query,

Re: [GENERAL] Question slow query

2017-01-16 Thread Patrick B
2017-01-12 16:48 GMT+13:00 Andreas Joseph Krogh : > På torsdag 12. januar 2017 kl. 03:15:59, skrev Patrick B < > patrickbake...@gmail.com>: > > Hi guys, > > I've got a slow query, running at 25 seconds. > > > -> Bitmap Heap Scan on ja_notes r_1103088

Re: [GENERAL] Question slow query

2017-01-11 Thread Andreas Joseph Krogh
På torsdag 12. januar 2017 kl. 03:15:59, skrev Patrick B < patrickbake...@gmail.com >: Hi guys,   I've got a slow query, running at 25 seconds.   -> Bitmap Heap Scan on ja_notes r_1103088 (cost=234300.55..1254978.62 rows=553275 width=101) (actual

[GENERAL] Question slow query

2017-01-11 Thread Patrick B
Hi guys, I've got a slow query, running at 25 seconds. -> Bitmap Heap Scan on ja_notes r_1103088 (cost=234300.55..1254978.62 rows=553275 width=101) (actual time=1423.411..10572.549 rows=475646 loops=1) Recheck Cond: (n_type = ANY

[GENERAL] Question about RUM's TODO-list

2016-11-14 Thread Andreas Joseph Krogh
Hi.   The following TODO-items are on RUM's TODO-list:   * Allow multiple additional information (lexemes positions + timestamp). * Add support for arrays.   Will any of these items support storing BIGINT as part of a tsvector+timestamp? so one an have an index like this: create index rum_idx

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Charles Clavadetscher
tscher > <clavadetsc...@swisspug.org> > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Question on replace function [solved] > > On 09/25/2016 08:39 AM, Tom Lane wrote: > > Charles Clavadetscher <clavadetsc...@swisspug.org> writes: > >> Honestly I still don't

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Adrian Klaver
On 09/25/2016 08:39 AM, Tom Lane wrote: > Charles Clavadetscher writes: >> Honestly I still don't understand why this happened this way. > > I wonder if you have standard_conforming_strings turned off, or > did when that data was inserted. That would change the

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Tom Lane
Charles Clavadetscher writes: > Honestly I still don't understand why this happened this way. I wonder if you have standard_conforming_strings turned off, or did when that data was inserted. That would change the behavior of backslashes in string literals.

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Adrian Klaver
On 09/25/2016 05:45 AM, Charles Clavadetscher wrote: Hi Rob On 09/25/2016 01:39 PM, rob stone wrote: On Sun, 2016-09-25 at 10:29 +0200, Charles Clavadetscher wrote: Hello I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit I imported data

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Charles Clavadetscher
Hi Rob On 09/25/2016 01:39 PM, rob stone wrote: > > On Sun, 2016-09-25 at 10:29 +0200, Charles Clavadetscher wrote: >> Hello >> >> I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by >> gcc >> (Debian 4.7.2-5) 4.7.2, 64-bit >> >> I imported data from a MariaDB table into

Re: [GENERAL] Question on replace function

2016-09-25 Thread rob stone
On Sun, 2016-09-25 at 10:29 +0200, Charles Clavadetscher wrote: > Hello > > I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by > gcc  > (Debian 4.7.2-5) 4.7.2, 64-bit > > I imported data from a MariaDB table into PostgreSQL and noticed > that  > the content of a field was not

[GENERAL] Question on replace function

2016-09-25 Thread Charles Clavadetscher
Hello I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit I imported data from a MariaDB table into PostgreSQL and noticed that the content of a field was not correct, but I was not able to change it. The field is called vcard and is of

Re: [GENERAL] Question about "grant create on database" and pg_dump/pg_dumpall

2016-09-23 Thread Rafia Sabih
On Tue, Jul 5, 2016 at 06:39 AM, Haribabu Kommi kommi(dot)haribabu(at)gmail(dot)com wrote: Still i feel the GRANT statements should be present, as the create database statement is generated only with -C option. So attached patch produces the GRANT statements based on the -x option. The attached

Re: [GENERAL] question on error during COPY FROM

2016-09-17 Thread Melvin Davidson
On Tue, Aug 23, 2016 at 6:04 AM, Jerome Wagner wrote: > Hello, > > in the documentation I read > https://www.postgresql.org/docs/current/static/sql-copy.html > > > COPY stops operation at the first error. This should not lead to problems > in the event of a COPY TO,

Re: [SPAM] Re: [GENERAL] Question about locking and pg_locks

2016-09-12 Thread Adrian Klaver
On 09/12/2016 12:47 AM, Moreno Andreo wrote: Ccing list. Il 08/09/2016 15:26, Adrian Klaver ha scritto: so, I should be able to manage 800*64 = 5120 locks, right? OMG, time to go back to school... 800*64 = 51200 ! ! ! Now my pg_locks table has more than 6200 rows, but if I reorder them by

Re: [GENERAL] Question about locking and pg_locks

2016-09-12 Thread Moreno Andreo
Il 10/09/2016 23:07, Jeff Janes ha scritto: On Thu, Sep 8, 2016 at 4:30 AM, Moreno Andreo wrote: Hi folks! :-) This morning I was woken up by a call of a

Re: [GENERAL] Question about locking and pg_locks

2016-09-10 Thread Jeff Janes
On Thu, Sep 8, 2016 at 4:30 AM, Moreno Andreo wrote: > Hi folks! :-) > > This morning I was woken up by a call of a coworker screaming "Help, our > Postgres server is throwing strange errors!" > Not the best way to start your day... > > OK, to the serious part. > >

Re: [GENERAL] Question about locking and pg_locks

2016-09-08 Thread Adrian Klaver
On 09/08/2016 04:30 AM, Moreno Andreo wrote: Hi folks! :-) This morning I was woken up by a call of a coworker screaming "Help, our Postgres server is throwing strange errors!" Not the best way to start your day... OK, to the serious part. "Strange errors" were (in postgresql-9.1-main.log)

[GENERAL] Question about locking and pg_locks

2016-09-08 Thread Moreno Andreo
Hi folks! :-) This morning I was woken up by a call of a coworker screaming "Help, our Postgres server is throwing strange errors!" Not the best way to start your day... OK, to the serious part. "Strange errors" were (in postgresql-9.1-main.log) WARNING: out of shared memory ERROR: out of

Re: [GENERAL] question on error during COPY FROM

2016-08-23 Thread Francisco Olarte
On Tue, Aug 23, 2016 at 4:06 PM, Rakesh Kumar wrote: > Is it true that one datafile in PG can only belong to one object (table/index) If this is a question, yes, AFAIK ( in fact they are split in 1G chunks to prevent problems with quirky filesystems ). Search for

Re: [GENERAL] question on error during COPY FROM

2016-08-23 Thread Adrian Klaver
On 08/23/2016 07:06 AM, Rakesh Kumar wrote: Is it true that one datafile in PG can only belong to one object (table/index) Yes, assuming by datafile you mean an on disk file. Though one object may have many in disk files associated with it:

Re: [GENERAL] question on error during COPY FROM

2016-08-23 Thread Rakesh Kumar
Is it true that one datafile in PG can only belong to one object (table/index) On Tue, Aug 23, 2016 at 9:55 AM, Francisco Olarte wrote: > On Tue, Aug 23, 2016 at 2:32 PM, Ilya Kazakevich > wrote: >>>does that mean that I should always

Re: [GENERAL] question on error during COPY FROM

2016-08-23 Thread Francisco Olarte
On Tue, Aug 23, 2016 at 2:32 PM, Ilya Kazakevich wrote: >>does that mean that I should always execute a VACUUM to recover the >>wasted space when an error is triggered or will the auto-vacuum mechanism >>do the job by itself ? > If you have autovacuum enabled it

Re: [GENERAL] question on error during COPY FROM

2016-08-23 Thread Ilya Kazakevich
Hi. >does that mean that I should always execute a VACUUM to recover the >wasted space when an error is triggered or will the auto-vacuum mechanism >do the job by itself ? If you have autovacuum enabled it will clean up tablespace. However, space will not be returned to filesystem but will be

[GENERAL] question on error during COPY FROM

2016-08-23 Thread Jerome Wagner
Hello, in the documentation I read https://www.postgresql.org/docs/current/static/sql-copy.html COPY stops operation at the first error. This should not lead to problems in the event of a COPY TO, but the target table will already have received earlier rows in a COPY FROM. These rows will not

Re: [GENERAL] Question about performance - Postgres 9.5

2016-08-16 Thread Sameer Kumar
On Wed, 17 Aug 2016, 1:36 p.m. Venkata B Nagothi, wrote: > On Mon, Jun 13, 2016 at 8:37 AM, Patrick B > wrote: > >> Hi guys, >> >> In the db I'm working one, it will be three tables: >> >> visits, work, others. >> >> Everything the customer do, will

Re: [GENERAL] Question about performance - Postgres 9.5

2016-08-16 Thread Venkata B Nagothi
On Mon, Jun 13, 2016 at 8:37 AM, Patrick B wrote: > Hi guys, > > In the db I'm working one, it will be three tables: > > visits, work, others. > > Everything the customer do, will be logged. All inserts/updates/deletes > will be logged. > > Option 1: Each table would

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-05 Thread Patrick B
Hi guys, I can now confirm that by taking off the IONICE command solved my problem. Thanks a lot ! Patrick

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-05 Thread Alex Ignatov
Hello! As I can see files is delivered not with delay but with timeshift. 1. Can you show me restore_command on slave? 2. Also can you check archived WAL creation time on slaves in archive location after you copied them with archive_command? Is in near WAL creation time in pg_xlogs? Or

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
> > > And the time difference is on ALL slaves, or just the two in a different > country? > > > All of them! :(

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Melvin Davidson
On Thu, Aug 4, 2016 at 4:32 PM, Patrick B wrote: > >>> >> Just out of curiostity, are the slaves in the same physical location, or >> by some chance are they on a remote site? >> >> >> > two of them in the same physical location, and the other two different > country. >

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
> > >> > Just out of curiostity, are the slaves in the same physical location, or > by some chance are they on a remote site? > > > two of them in the same physical location, and the other two different country.

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Melvin Davidson
On Thu, Aug 4, 2016 at 4:16 PM, Patrick B wrote: > >>> >> https://www.postgresql.org/docs/9.5/static/continuous-archiv >> ing.html#BACKUP-ARCHIVING-WAL >> >> "However, archive_command can be changed with a configuration file >> reload." >> >>

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Adrian Klaver
On 08/04/2016 01:16 PM, Patrick B wrote: https://www.postgresql.org/docs/9.5/static/continuous-archiving.html#BACKUP-ARCHIVING-WAL "However, archive_command can be changed with a

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
> > >> > https://www.postgresql.org/docs/9.5/static/continuous-archiv > ing.html#BACKUP-ARCHIVING-WAL > > "However, archive_command can be changed with a configuration file reload." > > Cheers... I removed the IONICE command from the archive_command. However, did not

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Adrian Klaver
On 08/04/2016 12:55 PM, Patrick B wrote: @Adrian, Seems to me the settings for nice and ionice above would, on a busy machine, slow down the transfer. Has there always been a notable time difference in the transfer or has it gotten worse over time? Yep... I also thought about

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Patrick B
@Adrian, > Seems to me the settings for nice and ionice above would, on a busy > machine, slow down the transfer. Has there always been a notable time > difference in the transfer or has it gotten worse over time? > > Yep... I also thought about that. Specially because the master is constantly

Re: [GENERAL] Question on table inheritance and privileges

2016-08-04 Thread Adrian Klaver
On 08/02/2016 09:35 PM, 윤기태 wrote: Dear pgsql-general, I found something strange with DROP TABLE CASCADE. Not really, explanation inline below. create role a login; grant all on database mydb to a; create role b inherit role a login; grant all on database mydb to b; The above leads to

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread Adrian Klaver
On 08/03/2016 07:59 PM, Patrick B wrote: Both machines have same timezone? Yes! Shouldn't be showing 2 hours before.. I just checked and both server has the same date / timezone How fast are you generating WALs? Check below please checkpoint_segments = 64

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-04 Thread John R Pierce
On 8/3/2016 7:59 PM, Patrick B wrote: *postgresql.conf:* archive_command = 'exec nice -n 19 ionice -c 2 -n 7 archive_command.bash "%p" slave01 slave02' *archive_command.bash:* Basically we use TAR to ship through ssh: # we use tar over SSH as I don't fully trust scp's exit

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-03 Thread Venkata Balaji N
> > I use a bash script to ship them. The script hasn't being changed So > it isn't the problem. > > > *postgresql.conf:* > >> archive_command = 'exec nice -n 19 ionice -c 2 -n 7 archive_command.bash >> "%p" slave01 slave02' > > *archive_command.bash:* > > Basically we use TAR to ship through

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-03 Thread Patrick B
> > >> > Both machines have same timezone? > Yes! Shouldn't be showing 2 hours before.. I just checked and both server has the same date / timezone > > How fast are you generating WALs? > Check below please checkpoint_segments = 64 > checkpoint_timeout = 5min > checkpoint_completion_target =

Re: [GENERAL] Question about wal files / pg_xlogs

2016-08-03 Thread Adrian Klaver
On 08/03/2016 07:21 PM, Patrick B wrote: Hi all, I'm currently using PostgreSQL 9.2. I noticed that the wal_files are being generated by the master well, no problems. But on the slaves, it seems to be a delay to the delivery of those wal_files. I got two slaves using streaming replication and

[GENERAL] Question about wal files / pg_xlogs

2016-08-03 Thread Patrick B
Hi all, I'm currently using PostgreSQL 9.2. I noticed that the wal_files are being generated by the master well, no problems. But on the slaves, it seems to be a delay to the delivery of those wal_files. I got two slaves using streaming replication and wal files shipment from Master. *On the

[GENERAL] Question on table inheritance and privileges

2016-08-03 Thread 윤기태
Dear pgsql-general, I found something strange with DROP TABLE CASCADE. create role a login; grant all on database mydb to a; create role b inherit role a login; grant all on database mydb to b; (session of role a) psql -U a -d mydb; create schema a; create table a(i1 int); (session of role

Re: [GENERAL] question on parsing postgres sql queries

2016-07-27 Thread Alvaro Herrera
Kevin Grittner wrote: > On the other hand, try connecting to a database with > psql and typing: > > \h create index > > ... (or any other command name). The help you get there is fished > out of the docs. BTW I noticed a few days ago that we don't have a "where BLAH can be one of" section for

Re: [GENERAL] question on parsing postgres sql queries

2016-07-27 Thread Kevin Grittner
On Tue, Jul 26, 2016 at 4:20 AM, Jerome Wagner wrote: > I am doing some research on postgres sql query parsing. > I was wondering what people think of the conformance with regards to the > real parser of the documentations on > -

[GENERAL] question on parsing postgres sql queries

2016-07-27 Thread Jerome Wagner
Hello, I am doing some research on postgres sql query parsing. I have found the https://github.com/lfittl/libpg_query project which manages to re-use the native postgres server parser. For using this, you need to accept an external dependency on a lib compiled out of the postgres source. I was

Re: [GENERAL] question on parsing postgres sql queries

2016-07-27 Thread Jerome Wagner
> What problem are you trying to solve here?​ to whit not everything that can be parsed is documented - usually intentionally. I am tyring to see whether we could use the documentation as a kind of formal specification of the language but I understand that the devil is in the details and that

Re: [GENERAL] question on parsing postgres sql queries

2016-07-26 Thread David G. Johnston
On Tue, Jul 26, 2016 at 3:20 PM, Jerome Wagner wrote: > > Would it make sense to use these sgml synopsis as some kind of source of > truth, parse them, and automatically generate a parser for a specifc > language ? > ​What problem are you trying to solve here?​ to

Re: [GENERAL] question on parsing postgres sql queries

2016-07-26 Thread Tom Lane
Jerome Wagner writes: > Would it make sense to use these sgml synopsis as some kind of source of > truth, parse them, and automatically generate a parser for a specifc > language ? Probably not. First, it is not uncommon for corner cases (such as legacy syntaxes) to

[GENERAL] question on parsing postgres sql queries

2016-07-26 Thread Jerome Wagner
Hello, I am doing some research on postgres sql query parsing. I have found the https://github.com/lfittl/libpg_query project which manages to re-use the native postgres server parser. For using this, you need to accept an external dependency on a lib compiled out of the postgres source. I was

Re: [GENERAL] Question about antijoin

2016-07-12 Thread dandl
ginal Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Tom Lane > Sent: Wednesday, 13 July 2016 12:13 AM > To: dandl <da...@andl.org> > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Question about

Re: [GENERAL] Question about antijoin

2016-07-12 Thread Tom Lane
"dandl" writes: > This got my interest! It's of great interest to me to know how and when > Postgres performs an anti-join (this being a significant omission from SQL). > Is this a reliable trigger: (NOT EXISTS )? That's one case; see convert_EXISTS_sublink_to_join() for the

Re: [GENERAL] Question about antijoin

2016-07-12 Thread David Rowley
On 12 July 2016 at 12:41, dandl wrote: >>NOT EXISTS (SELECT NULL FROM dyr_pause_mot WHERE avlsnr = a.avlsnr) >> >> This can be executed as anti-join and is often more efficient. > > This got my interest! It's of great interest to me to know how and when > Postgres performs an

[GENERAL] Question about antijoin

2016-07-12 Thread dandl
>NOT EXISTS (SELECT NULL FROM dyr_pause_mot WHERE avlsnr = a.avlsnr) > > This can be executed as anti-join and is often more efficient. This got my interest! It's of great interest to me to know how and when Postgres performs an anti-join (this being a significant omission from SQL). Is

Re: [GENERAL] Question about "grant create on database" and pg_dump/pg_dumpall

2016-07-05 Thread Haribabu Kommi
On Fri, Jul 1, 2016 at 5:49 AM, David G. Johnston wrote: > > I have to agree. At worse this is a documentation bug but I do think we > have an actual oversight here - although probably not exactly this or the > linked bug report. > > Testing this out a bit on 9.5

Re: [GENERAL] Question about "grant create on database" and pg_dump/pg_dumpall

2016-06-30 Thread David G. Johnston
On Thu, Jun 30, 2016 at 1:38 PM, Murphy, Kevin wrote: > Is it expected that "grant * on database" grants are dumped only by > `pg_dumpall -s` and not by `pg_dump -s` or `pg_dumpall -g`? > > Some people might assume that to restore a cluster it should be sufficient > to

[GENERAL] Question about "grant create on database" and pg_dump/pg_dumpall

2016-06-30 Thread Murphy, Kevin
Is it expected that "grant * on database" grants are dumped only by `pg_dumpall -s` and not by `pg_dump -s` or `pg_dumpall -g`? Some people might assume that to restore a cluster it should be sufficient to restore pg_dumpall globals output followed by individual pg_dump output. Seemingly, this

Re: [GENERAL] Question about RUM-index

2016-06-17 Thread Oleg Bartunov
On Fri, Jun 17, 2016 at 4:50 PM, Andreas Joseph Krogh wrote: > På fredag 17. juni 2016 kl. 15:47:08, skrev Oleg Bartunov < > obartu...@gmail.com>: > > > > On Fri, Jun 17, 2016 at 3:52 PM, Andreas Joseph Krogh > wrote: >> >> På fredag 17. juni 2016 kl.

Re: [GENERAL] Question about RUM-index

2016-06-17 Thread Andreas Joseph Krogh
På fredag 17. juni 2016 kl. 15:47:08, skrev Oleg Bartunov >:     On Fri, Jun 17, 2016 at 3:52 PM, Andreas Joseph Krogh > wrote: På fredag 17. juni 2016 kl. 13:53:34, skrev Oleg Bartunov

Re: [GENERAL] Question about RUM-index

2016-06-17 Thread Oleg Bartunov
On Fri, Jun 17, 2016 at 3:52 PM, Andreas Joseph Krogh wrote: > På fredag 17. juni 2016 kl. 13:53:34, skrev Oleg Bartunov < > obartu...@gmail.com>: > > > > On Fri, Jun 17, 2016 at 2:10 PM, Oleg Bartunov > wrote: >> >> >> >> On Fri, Jun 17, 2016 at 9:32

  1   2   3   4   5   6   7   8   9   10   >