Embedded Vacuum Still Not Working... - Mailing list pgsql-general

From Lynn.Tilby@asu.edu
Subject Embedded Vacuum Still Not Working...
Date
Msg-id 1069308978.3fbc5c329c66a@webmail.asu.edu
Whole thread Raw
Responses Re: Embedded Vacuum Still Not Working...
List pgsql-general
/*
Hi,

Turning OFF AUTOCOMMIT as suggested didn't solve the problem.

Thanks again for your help!
Lynn Tilby
ltilby@asu.edu

******************************************************************************
*/

#include <stdlib.h>
#include <ctype.h>

EXEC SQL INCLUDE sqlca; /* include the sql debugging stuff... */

#define DEBUG_S(strg) printf("%s\n",strg);
#define DEBUG_I(intg) printf("%d\n",intg);
#define DEBUG_F(flot) printf("%f\n",flot);

/********* !!!!!!!!!!  POSTGRES SQL DEBUGGING STRUCTURE FIELDS ************/
#define DEBUG_SQL printf("sqlcaid = %s\n", sqlca.sqlcaid); printf("sqlabc =
%f\n", sqlca.sqlabc); printf("sqlcode = %f\n", sqlca.sqlcode);
printf("sqlca.sqlerrm.sqlerrml = %d\n", sqlca.sqlerrm.sqlerrml);
printf("sqlca.sqlerrm.sqlerrmc = %s\n", sqlca.sqlerrm.sqlerrmc); printf("sqlerrp
= %s\n", sqlca.sqlerrp); printf("sqlerrd = %f\n", sqlca.sqlerrd); printf("sqlext
= %s\n", sqlca.sqlext);

int main()
{

  EXEC SQL BEGIN DECLARE SECTION; /* declare the variables used by sql */

  EXEC SQL END DECLARE SECTION; /* declare the variables used by sql */

  EXEC SQL CONNECT TO pma;
  EXEC SQL WHENEVER sqlerror sqlprint; /* turn on verbose sql error ckg */

DEBUG_SQL
    EXEC SQL SET AUTOCOMMIT = OFF;
DEBUG_SQL
  EXEC SQL VACUUM ANALYZE optn_cent_xref;
DEBUG_SQL
}
****************************************************************************
[lynn@polaris strdl_sim]$ make vrfy_prob
/usr/local/pgsql/bin/ecpg -I/usr/local/pgsql/include -o vrfy_prob.c vrfy_prob.cpg
gcc -g3 -I/usr/include/pgsql -o vrfy_prob -lm -lc -lecpg -lpq vrfy_prob.c
[lynn@polaris strdl_sim]$ ./vrfy_prob
sqlcaid = SQLCA   Œ
sqlabc = -1.998680
sqlcode = -1.998680
sqlca.sqlerrm.sqlerrml = 0
sqlca.sqlerrm.sqlerrmc =
sqlerrp = NOT SET
sqlerrd = -1.998680
sqlext =
sqlcaid = SQLCA   Œ
sqlabc = -1.998680
sqlcode = -1.998680
sqlca.sqlerrm.sqlerrml = 0
sqlca.sqlerrm.sqlerrmc =
sqlerrp = NOT SET
sqlerrd = -1.998680
sqlext =
sql error Postgres error: ERROR:  VACUUM cannot run inside a BEGIN/END block
 line 39.
sqlcaid = SQLCA   Œ
sqlabc = -1.998680
sqlcode = -1.998681
sqlca.sqlerrm.sqlerrml = 76
sqlca.sqlerrm.sqlerrmc = Postgres error: ERROR:  VACUUM cannot run inside a
BEGIN/END block
 line 39.
sqlerrp =  39.
sqlerrd = -1.998680
sqlext =
[lynn@polaris strdl_sim]$


/*
Hi,

Turning OFF AUTOCOMMIT as suggested didn't solve the problem.

Thanks again for your help!
Lynn Tilby
ltilby@asu.edu

******************************************************************************
*/

#include <stdlib.h>
#include <ctype.h>

EXEC SQL INCLUDE sqlca; /* include the sql debugging stuff... */

#define DEBUG_S(strg) printf("%s\n",strg);
#define DEBUG_I(intg) printf("%d\n",intg);
#define DEBUG_F(flot) printf("%f\n",flot);

/********* !!!!!!!!!!  POSTGRES SQL DEBUGGING STRUCTURE FIELDS ************/
#define DEBUG_SQL printf("sqlcaid = %s\n", sqlca.sqlcaid); printf("sqlabc = %f\n", sqlca.sqlabc); printf("sqlcode =
%f\n",sqlca.sqlcode); printf("sqlca.sqlerrm.sqlerrml = %d\n", sqlca.sqlerrm.sqlerrml); printf("sqlca.sqlerrm.sqlerrmc =
%s\n",sqlca.sqlerrm.sqlerrmc); printf("sqlerrp = %s\n", sqlca.sqlerrp); printf("sqlerrd = %f\n", sqlca.sqlerrd);
printf("sqlext= %s\n", sqlca.sqlext); 

int main()
{

  EXEC SQL BEGIN DECLARE SECTION; /* declare the variables used by sql */

  EXEC SQL END DECLARE SECTION; /* declare the variables used by sql */

  EXEC SQL CONNECT TO pma;
  EXEC SQL WHENEVER sqlerror sqlprint; /* turn on verbose sql error ckg */

DEBUG_SQL
    EXEC SQL SET AUTOCOMMIT = OFF;
DEBUG_SQL
  EXEC SQL VACUUM ANALYZE optn_cent_xref;
DEBUG_SQL
}
****************************************************************************
[lynn@polaris strdl_sim]$ make vrfy_prob
/usr/local/pgsql/bin/ecpg -I/usr/local/pgsql/include -o vrfy_prob.c vrfy_prob.cpg
gcc -g3 -I/usr/include/pgsql -o vrfy_prob -lm -lc -lecpg -lpq vrfy_prob.c
[lynn@polaris strdl_sim]$ ./vrfy_prob
sqlcaid = SQLCA   Œ
sqlabc = -1.998680
sqlcode = -1.998680
sqlca.sqlerrm.sqlerrml = 0
sqlca.sqlerrm.sqlerrmc =
sqlerrp = NOT SET
sqlerrd = -1.998680
sqlext =
sqlcaid = SQLCA   Œ
sqlabc = -1.998680
sqlcode = -1.998680
sqlca.sqlerrm.sqlerrml = 0
sqlca.sqlerrm.sqlerrmc =
sqlerrp = NOT SET
sqlerrd = -1.998680
sqlext =
sql error Postgres error: ERROR:  VACUUM cannot run inside a BEGIN/END block
 line 39.
sqlcaid = SQLCA   Œ
sqlabc = -1.998680
sqlcode = -1.998681
sqlca.sqlerrm.sqlerrml = 76
sqlca.sqlerrm.sqlerrmc = Postgres error: ERROR:  VACUUM cannot run inside a BEGIN/END block
 line 39.
sqlerrp =  39.
sqlerrd = -1.998680
sqlext =
[lynn@polaris strdl_sim]$



pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: SCSI vs. IDE performance test
Next
From: Stef
Date:
Subject: Re: Point-in-time data recovery - v.7.4