Re: PostgreSQL backup issue

2018-05-22 Thread Michael Paquier
On Tue, May 22, 2018 at 10:35:46PM -0700, David G. Johnston wrote: > I would conclude that pg-basebackup is placing its output in stderr instead > of stdout then... The output of pg_basebackup's verbose mode goes to stderr (look for example at the verbose flags in pg_basebackup.c). -- Michael si

Re: PostgreSQL backup issue

2018-05-22 Thread David G. Johnston
On Tuesday, May 22, 2018, Jayadevan M wrote: > pg_basebackup ... | tee -- Also, the output from pg_basebackup does not > get logged in $logfile even on those days when the backup works fine. > I would conclude that pg-basebackup is placing its output in stderr instead of stdout then... David J

PostgreSQL backup issue

2018-05-22 Thread Jayadevan M
Hello all, I have a PostgreSQL backup script which executes daily. The backup creates no output on "some" days - no pattern observed yet. There is no space issue. Here are the relevant lines from the shell script. mkdir $bdir echo "Backup began at " `date` | tee -a $logfile pg_basebackup --chec

Per-document document statistics

2018-05-22 Thread Berend Tober
I'm trying to figure out how to compile text search statistics on a per-document basis. While I successfully compute text search statistics for the entire corpus with a call to ts_stat after having inserted all documents, what I also want is to run ts_stat on the tsvector for each row so as to

Re: Errors with physical replication

2018-05-22 Thread Kyotaro HORIGUCHI
Hello. At Mon, 21 May 2018 05:18:57 -0700 (MST), greigwise wrote in <1526905137308-0.p...@n3.nabble.com> > Hello. > > We are on Postgresql version 9.6.6. We have 2 EC2 instances in different > Amazon regions and we are doing physical replication via VPN. It all seems > to work just fine mos

Re: Error on vacuum: xmin before relfrozenxid

2018-05-22 Thread Andres Freund
Hi, On 2018-05-23 00:04:26 +0200, Paolo Crosato wrote: > I managed to recover the log of the first time we run into the issue, the > error was the same but on template1: > > May 8 11:26:46 xxx postgres[32543]: [1154-1] user=,db=,client= ERROR: > found xmin 2600758304 from before relfrozenxid 400

Re: pg_multixact/members growing

2018-05-22 Thread Thomas Munro
On Wed, May 23, 2018 at 7:49 AM, Tom Lane wrote: > Tiffany Thang writes: >> Our pg_multixact/members directory has been growing to more than 18GB over >> the last couple of months. According to the documentation, the files in >> there are used to support row locking by multiple transactions and w

Re: Error on vacuum: xmin before relfrozenxid

2018-05-22 Thread Paolo Crosato
Good evening, 2018-05-22 23:19 GMT+02:00 Andres Freund : > Hi, > > On 2018-05-22 21:43:01 +0200, Paolo Crosato wrote: > > > Could you report the result of > > > select ctid, xmin, xmax from pg_authid ; > > > > > > > This is the result: > > > > postgres=# select ctid, xmin, xmax from pg_authid ; >

Re: Error on vacuum: xmin before relfrozenxid

2018-05-22 Thread Andres Freund
Hi, On 2018-05-22 21:43:01 +0200, Paolo Crosato wrote: > > Could you report the result of > > select ctid, xmin, xmax from pg_authid ; > > > > This is the result: > > postgres=# select ctid, xmin, xmax from pg_authid ; > (0,16) | 3031994631 |0 > 16 | 6496 |1 |144 | 303199463

Re: source of connection fails at pg startup?

2018-05-22 Thread Stuart McGraw
On 05/22/2018 07:58 AM, Tom Lane wrote: Stuart McGraw writes: When I start my postgresql server I get 11 messages reporting that "password authentication failed for user 'postgres'" spaced about ~.5sec apart. Sounds like the trace of something probing the postmaster to see if it's ready yet.

Re: pg_multixact/members growing

2018-05-22 Thread Tom Lane
Tiffany Thang writes: > Our pg_multixact/members directory has been growing to more than 18GB over > the last couple of months. According to the documentation, the files in > there are used to support row locking by multiple transactions and when all > tables in all databases are eventually scanne

Re: Error on vacuum: xmin before relfrozenxid

2018-05-22 Thread Paolo Crosato
Hello, 2018-05-22 18:49 GMT+02:00 Andres Freund : > Hi, > > On 2018-05-22 16:18:20 +0200, Paolo Crosato wrote: > > PostgreSQL version number you are running: > > > > PostgreSQL 10.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 > > 20150623 (Red Hat 4.8.5-28), 64-bit > > > > How you instal

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-22 Thread Maxim Boguk
On Tue, May 22, 2018 at 10:30 PM, Andres Freund wrote: > Hi, > > On 2018-05-22 22:18:15 +0300, Maxim Boguk wrote: > > On Tue, May 22, 2018 at 9:47 PM, Andres Freund > wrote: > > > > select relfrozenxid from pg_class where relname='pg_authid'; > > > > relfrozenxid > > > > -- > > > >

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-22 Thread Andres Freund
Hi, On 2018-05-22 22:18:15 +0300, Maxim Boguk wrote: > On Tue, May 22, 2018 at 9:47 PM, Andres Freund wrote: > > > select relfrozenxid from pg_class where relname='pg_authid'; > > > relfrozenxid > > > -- > > >2863429136 > ​select txid_current(); > txid_current > --

pg_multixact/members growing

2018-05-22 Thread Tiffany Thang
Hi, Our pg_multixact/members directory has been growing to more than 18GB over the last couple of months. According to the documentation, the files in there are used to support row locking by multiple transactions and when all tables in all databases are eventually scanned by VACUUM, the older mult

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-22 Thread Maxim Boguk
On Tue, May 22, 2018 at 9:47 PM, Andres Freund wrote: > Hi, > > On 2018-05-22 21:30:43 +0300, Maxim Boguk wrote: > > ​For sample: > > > > postgres=# vacuum pg_catalog.pg_authid; > > ERROR: found xmin 2894889518 from before relfrozenxid 248712603 > > > > select ctid, xmin, xmax, cmin, cmax from p

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-22 Thread Andres Freund
Hi, On 2018-05-22 21:30:43 +0300, Maxim Boguk wrote: > ​For sample: > > postgres=# vacuum pg_catalog.pg_authid; > ERROR: found xmin 2894889518 from before relfrozenxid 248712603 > > select ctid, xmin, xmax, cmin, cmax from pg_catalog.pg_authid where > xmin::text::bigint=2894889518; > ctid |

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-22 Thread Maxim Boguk
Hi Andres, > ​ > > Looking for possible course of action. > > Probably simplest fix - drop and recreate these 6 affected users, but so > > far I willing spent some time research into this issue. > > Could you use pageinspect to get the infomasks for the affected tuples? > > Greetings, > > Andres

Announcement of a new C++ API to PostgreSQL.

2018-05-22 Thread Dmitry Igrishin
Hello everyone, I would like to announce the initial beta release of Pgfe, a modern C++ API to PostgreSQL that simplifies working with PostgreSQL in C++. The page on GitHub - https://github.com/dmitigr/pgfe The documentation - http://dmitigr.ru/pgfe/doc To build Pgfe the C++17 compiler, such as

Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

2018-05-22 Thread Andres Freund
On 2018-05-15 11:06:38 +0200, Maxim Boguk wrote: > ​Hi everyone, > > I just got the same issue on 9.6.8: > > 2018-05-15 11:52:01 MSK 33558 @ from [vxid:317/92895305 txid:0] [] ERROR: > found xmin 2808837517 from before relfrozenxid 248712603 > 2018-05-15 11:52:01 MSK 33558 @ from [vxid:317/9289

Re: Error on vacuum: xmin before relfrozenxid

2018-05-22 Thread Andres Freund
Hi, On 2018-05-22 16:18:20 +0200, Paolo Crosato wrote: > PostgreSQL version number you are running: > > PostgreSQL 10.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 > 20150623 (Red Hat 4.8.5-28), 64-bit > > How you installed PostgreSQL: > > From the pgdg yum repositories. > > Changes ma

Error on vacuum: xmin before relfrozenxid

2018-05-22 Thread Paolo Crosato
Hi, we have an error happening on a catalog table on one of the dbs in the instance. This is the error report form: A description of what you are trying to achieve and what results you expect.: Any kind of vacuum fails on pg_authid table, I would expect it to succeed. This is occasionaly blockin

Re: source of connection fails at pg startup?

2018-05-22 Thread Tom Lane
Stuart McGraw writes: > When I start my postgresql server I get 11 messages reporting that "password > authentication failed for user 'postgres'" spaced about ~.5sec apart. Sounds like the trace of something probing the postmaster to see if it's ready yet. Pre-v10 versions of pg_ctl did exactly

Re: Help in Postgresql

2018-05-22 Thread Melvin Davidson
On Tue, May 22, 2018 at 8:58 AM, mooh Rash wrote: > Hi , > > I am a PhD student searching in query optimization. I want to access the > information about queries and statistics. Especially, I am interested in > finding > out how I can collect the history information (user, when, query, > query

Help in Postgresql

2018-05-22 Thread mooh Rash
Hi , I am a PhD student searching in query optimization. I want to access the information about queries and statistics. Especially, I am interested in    finding out how I can collect the history information (user, when, query, query_plan) from postgreqsl. Also, I wonder if there is a plan-table

Re: source of connection fails at pg startup?

2018-05-22 Thread Adrian Klaver
On 05/21/2018 10:48 PM, Stuart McGraw wrote: When I start my postgresql server I get 11 messages reporting that "password authentication failed for user 'postgres'" spaced about ~.5sec apart. I increased the logging level to INFO, and added the application name to the message format (after the

Re: posgresql.log

2018-05-22 Thread Bob Jolliffe
Hi Bartek It is quite significant that your postgres log file has these entries. Normally if a web application gets compromised allowing remote code execution, the attacker will be able to run scripts (often via cron and at) as the user running the web application. Typically www-data, tomcat8 etc

Re: Streaming Replication between PostGreSQL 9.2.2 on Red Hat and PostGreSQL 9.2.24 on Debian

2018-05-22 Thread Jonatan Evald Buus
Thanks Ian, thank you for pointing out the obvious. It appears that Debian's *pg_dropcluster* command had unexpected consequences you live, you pull out your hair in frustration and you learn. I now have streaming replication working as we expected, can you confirm that my *(somewhat unusual s

Re: source of connection fails at pg startup?

2018-05-22 Thread Luan Huynh
Hi Stuart McGraw, How about your "log_line_prefix " ? On Tue, May 22, 2018 at 7:48 AM, Stuart McGraw wrote: > When I start my postgresql server I get 11 messages reporting that > "password > authenticatio