Re: [HACKERS] proposal: get oldest LSN - function

2016-03-11 Thread Michael Paquier
On Fri, Mar 11, 2016 at 2:35 PM, Kartyshov Ivan wrote: > You wrote "If you care about the oldest record available you should look for > the first LSN position of the oldest segment, no?" > Yes I do it exactly this way. Your patch does that: +XLogRecPtrresult;

Re: [HACKERS] proposal: get oldest LSN - function

2016-03-11 Thread Kartyshov Ivan
On 11.03.2016 16:33, Kartyshov Ivan wrote: On 28.02.2016 11:36, Michael Paquier wrote: On Sun, Feb 28, 2016 at 4:40 PM, Kartyshov Ivan wrote: It will not satisfy our purposes and our administrators for three reasons. 1) DBA set me task to get the oldest number that present in WAL, not

Re: [HACKERS] proposal: get oldest LSN - function

2016-03-11 Thread Kartyshov Ivan
On 28.02.2016 11:36, Michael Paquier wrote: On Sun, Feb 28, 2016 at 4:40 PM, Kartyshov Ivan wrote: It will not satisfy our purposes and our administrators for three reasons. 1) DBA set me task to get the oldest number that present in WAL, not last Yeah I got that. 2) Surely we can choose

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-28 Thread Michael Paquier
On Sun, Feb 28, 2016 at 4:40 PM, Kartyshov Ivan wrote: > It will not satisfy our purposes and our administrators for three reasons. > 1) DBA set me task to get the oldest number that present in WAL, not last Yeah I got that. > 2) Surely we can choose the oldest segment from list

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-27 Thread Kartyshov Ivan
On 27.02.2016 16:09, Michael Paquier wrote: On Sat, Feb 27, 2016 at 3:52 PM, Kartyshov Ivan wrote: Maybe i wasn't too accurate in terms, because I newbie, but: We can get information about xlog, using big amout of support function (pg_current_xlog_location(),

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-27 Thread Kartyshov Ivan
On 27.02.2016 22:36, Yury Zhuravlev wrote: Hello. You forgot to declare a GetXLogOldestLSNPtr function in a header file (in xlog.h I think). Some compilers refuse to compile this code (MSVC for example). Now I see warning from GCC: xlog.c:10627:1: warning: no previous prototype for

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-27 Thread Yury Zhuravlev
Hello. You forgot to declare a GetXLogOldestLSNPtr function in a header file (in xlog.h I think). Some compilers refuse to compile this code (MSVC for example). Now I see warning from GCC: xlog.c:10627:1: warning: no previous prototype for «GetXLogOldestLSNPtr» [-Wmissing-prototypes]

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-27 Thread Michael Paquier
On Sat, Feb 27, 2016 at 3:52 PM, Kartyshov Ivan wrote: > On 27.02.2016 03:07, Andres Freund wrote >> >> How does it help with any of that? > > Maybe i wasn't too accurate in terms, because I newbie, but: > We can get information about xlog, using big amout of support

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-26 Thread Kartyshov Ivan
On 27.02.2016 03:07, Andres Freund wrote How does it help with any of that? Hi, thank you for fast answer. Maybe i wasn't too accurate in terms, because I newbie, but: We can get information about xlog, using big amout of support function (pg_current_xlog_location(),

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-26 Thread Andres Freund
On 2016-02-26 18:45:14 +0300, Kartyshov Ivan wrote: > Function pg_oldest_xlog_location gets us the oldest LSN (Log Sequence > Number) in xlog. > > It is useful additional tool for DBA (we can get replicationSlotMinLSN, so > why not in master), it can show us, if xlog replication or wal-sender is