multiple nodes in FDW create server statement

2019-07-02 Thread Vijaykumar Jain
All, We are glad that we have this feature that allows us to load balance reads. that has helped us a lot. https://paquier.xyz/postgresql-2/postgres-10-multi-host-connstr/ I would like to know if it is possible to request a similar enhancement to FDWs too?

Re: plpgsql: How to modify a field in an array of records

2019-07-02 Thread Dirk Mika
-- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika ## How2Use ## the

Re: plpgsql: How to modify a field in an array of records

2019-07-02 Thread Dirk Mika
-- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika ## How2Use ## the

Re: plpgsql: How to modify a field in an array of records

2019-07-02 Thread raf
Dirk Mika wrote: > Hi, > > Another Oracle -> PostgreSQL Question. ☺ > > I try to migrate a package procedure. Local types were declared in the Oracle > package: > > TYPE t_class_record IS RECORD > ( > id_class classes.id_class%TYPE, > field1 number, > field2

Re:

2019-07-02 Thread Adrian Klaver
On 7/2/19 4:08 PM, Andrew Kerber wrote: Yes, CSV stands for comma separated variable length.  This means that CSV = Comma Separated Values the fields in each row should be separated by commas, with a carriage return at the end of each record.  You have a file using | separators, which mean

Re:

2019-07-02 Thread Andrew Kerber
Yes, CSV stands for comma separated variable length. This means that the fields in each row should be separated by commas, with a carriage return at the end of each record. You have a file using | separators, which mean it is not csv. On Tue, Jul 2, 2019 at 6:04 PM wrote: > Laurenz Albe

Re:

2019-07-02 Thread raf
Laurenz Albe wrote: > On Tue, 2019-07-02 at 13:09 +0530, Prakash Ramakrishnan wrote: > > We are getting below error while during import the csv file please do the > > needful. > > I'd say the needful thing here is for you to read the documentation... > > > -bash-4.2$ more ckr_sto.csv > >

pglogical extension. - 2 node master <-> master logical replication ?

2019-07-02 Thread Day, David
Anyone with a test scripts or link to an example of bi-directional master using pglogical. ? I am led to believe from the documentation that this should be possible. (?) "Limited multi-master support with conflict resolution exists, but mutual replication connections must be added individually"

Re: Statistics tables not being updated anymore

2019-07-02 Thread Adrien Nayrat
Hello, FYI, check_pgactivity has a service to detect frozen stat collector: https://github.com/OPMDG/check_pgactivity#user-content-stat_snapshot_age-9.5 We added this service after a customer has deactivated IPv6 that broke stat collector. Regards, signature.asc Description: OpenPGP digital

Re: plpgsql: How to modify a field in an array of records

2019-07-02 Thread Tom Lane
Dirk Mika writes: > But when I try to modify a field of a record in the array I get a syntax > error. > l_classes_array[i].field1 := l_value; > The error is ERROR: syntax error at or near "." Position: 12414 where > position points to the . after the [i]. I've no idea what's causing this >

Re: Statistics tables not being updated anymore

2019-07-02 Thread Adrian Klaver
On 7/2/19 6:28 AM, Ron wrote: On 7/1/19 1:48 PM, Tom Lane wrote: Ron writes: Statistics views like pg_stat_*_tables, pg_stat_*_indexes, pg_statio_*_tables and pg_statio_*_indexes aren't being updated anymore. Specifically, all counter fields are 0, and date fields are blank. Does anything

Re: Statistics tables not being updated anymore

2019-07-02 Thread Ron
On 7/1/19 1:48 PM, Tom Lane wrote: Ron writes: Statistics views like pg_stat_*_tables, pg_stat_*_indexes, pg_statio_*_tables and pg_statio_*_indexes aren't being updated anymore. Specifically, all counter fields are 0, and date fields are blank. Does anything show up in the postmaster log

Re: Sequences part 2

2019-07-02 Thread Thomas Kellerer
Karl Martin Skoldebrand schrieb am 02.07.2019 um 13:20: >>> Now I want to insert more countries, between France and Ireland. >> >> That is a wrong assumption - there is no "between" for rows in a >> relational database. >> > > Yes, I'm fairly aware of this. However the application the >

RE: Sequences part 2

2019-07-02 Thread Karl Martin Skoldebrand
> Yes, I'm fairly aware of this. However the application the database table > belongs to seems to rely on a specific order in the database. I.e. if I just > add value to the table they end up, possibly due to how the application is > coded in an undesireable spot on the web page. > That is

Re: Sequences part 2

2019-07-02 Thread Karsten Hilbert
On Tue, Jul 02, 2019 at 11:20:42AM +, Karl Martin Skoldebrand wrote: > Yes, I'm fairly aware of this. However the application the database table > belongs to seems to rely on a specific order in the database. I.e. if I just > add value to the table they end up, possibly due to how the

RE: Sequences part 2

2019-07-02 Thread Karl Martin Skoldebrand
Karl Martin Skoldebrand schrieb am 02.07.2019 um 12:44: > Looking more at sequences, I have some sequences that start with ID 1, > incrementing each record by 1. > > So I have e.g. 1 Spain 2. Germany 3. France 4. Ireland 5. Norway > > Now I want to insert more countries, between France and

Re: Sequences part 2

2019-07-02 Thread Thomas Kellerer
Karl Martin Skoldebrand schrieb am 02.07.2019 um 12:44: > Looking more at sequences, I have some sequences that start with ID 1, > incrementing each record by 1. > > So I have e.g. 1 Spain 2. Germany 3. France 4. Ireland 5. Norway > > Now I want to insert more countries, between France and

Sequences part 2

2019-07-02 Thread Karl Martin Skoldebrand
Hi again, Looking more at sequences, I have some sequences that start with ID 1, incrementing each record by 1. So I have e.g. 1 Spain 2. Germany 3. France 4. Ireland 5. Norway Now I want to insert more countries, between France and Ireland. And also alter the increment. That latter part might

Re:

2019-07-02 Thread Prakash Ramakrishnan
Thanks a lot. I will check and let you know. Regards, Prakash.R On Tue, Jul 2, 2019 at 1:15 PM Laurenz Albe wrote: > On Tue, 2019-07-02 at 13:09 +0530, Prakash Ramakrishnan wrote: > > We are getting below error while during import the csv file please do > the needful. > > I'd say the needful

Re:

2019-07-02 Thread Laurenz Albe
On Tue, 2019-07-02 at 13:09 +0530, Prakash Ramakrishnan wrote: > We are getting below error while during import the csv file please do the > needful. I'd say the needful thing here is for you to read the documentation... > -bash-4.2$ more ckr_sto.csv > 4937880 | 12 | 2015-01-05 |

Re: Statistics tables not being updated anymore

2019-07-02 Thread Laurenz Albe
Ron wrote: > v9.6.9 > > Statistics views like pg_stat_*_tables, pg_stat_*_indexes, pg_statio_*_tables > and pg_statio_*_indexes > aren't being updated anymore. Specifically, all counter fields are 0, and > date fields are blank. > > The first thing I checked was postgresql.conf (but it hasn't

[no subject]

2019-07-02 Thread Prakash Ramakrishnan
Hi Team, We are getting below error while during import the csv file please do the needful. CREATE TABLE ujshjk ( pod_id bigint NOT NULL, src_id smallint, eff_strt_dt date,eff_end_dt date,ins_dt timestamp without time zone,updt_dt timestamp without time zone,nat_key_1 character(50),nat_key_2

Re: restore error

2019-07-02 Thread Prakash Ramakrishnan
Thanks, I'll check it out. Regards, Prakash.R On Tue, Jul 2, 2019 at 1:05 PM Laurenz Albe wrote: > Prakash Ramakrishnan wrote: > > While restoring the database using psql getting below error any idea > about this? > > > > psql:AICH01PR.sql:641367264: ERROR: connection for foreign table >

Re: restore error

2019-07-02 Thread Laurenz Albe
Prakash Ramakrishnan wrote: > While restoring the database using psql getting below error any idea about > this? > > psql:AICH01PR.sql:641367264: ERROR: connection for foreign table > "mf_adm_spotservicefiles" cannot be established > DETAIL: ORA-12170: TNS:Connect timeout occurred Just

"invalid contrecord" error on replica

2019-07-02 Thread JOULAUD François
Hello, I encountered a problem on replicas after the primary crashed for lack of disk space. After the problem I had a constant flow of "invalid contrecord" logs and replication ceased working. The only way I found to make it work again was to completely restart the replica. The logs: Jun